5 Window Function Examples to Take Your SQL Skills to the Next Level
What are Window Functions?
Window functions are functions that perform calculations over multiple rows of the dataset while maintaining the same rows and row count of the original table.
10 Quick SQL Tips After Writing Daily in SQL for 3 Years
4. CTE > Sub-queries
In most situations you want to use a CTE (common table expression) instead of a sub-query.
5. Using SUM and CASE WHEN Together
select
sum(case when allergies = 'Penicillin' and city = 'Burlington' then 1 else 0 end) as allergies_burl
, sum(case when allergies = 'Penicillin' and city = 'Oakville' then 1 else 0 end) as allergies_oak
from patients
Start where clause with true
where 1=1
and ...
and ...
and...
7. Don’t Forget About Window Functions
select
p.*
, MAX(weight) over (partition by city) as maxwt_by_city
from patients p
Window functions are a great way to keep all of the data rows and then append another column with important aggregate details.
Why buy a Mac Studio when you can decapitate your own MacBook - The Verge
Converting a MacBook or other laptop into a screen-less "slabtop" is a completely different experience. Although Apple didn’t give us a computer inside a keyboard this year, you can just do it yourself.
Men Over 40 Should Do the Scorpion Stretch for Mobility Gains
Men over 40 can add the scorpion stretch, a floor based mobility exercise, to combat lower back pain and promote better movement.
Spiderman to Scorpion: Eb and Swole
To start, lie face-down on the floor, with your arms extended out on either side. Bend your left knee toward your glute, then squeeze the muscle to raise your left leg straight up, keeping your knee bent. Bring your left leg across your body—if you're able, try to touch the floor on the other side. Your torso will raise off the floor, but don’t let your hands move. Rotate your head along with the movement. When you’ve brought your left foot as close to the ground (and eventually, your right hand) as possible, hold the position for a beat. Then, slowly return to the starting position. Repeat the same movement for the right side of your body to complete one rep.
The Ideal Praise-to-Criticism Ratio
It’s the secret to high-performing teams — and strong marriages.
The average ratio for the highest-performing teams was 5.6 (that is, nearly six positive comments for every negative one). The medium-performance teams averaged 1.9 (almost twice as many positive comments than negative ones.) But the average for the low-performing teams, at 0.36 to 1, was almost three negative comments for every positive one.
Only positive feedback can motivate people to continue doing what they’re doing well, and do it with more vigor, determination, and creativity.
Premium Homeowners Insurance Platform Openly Sees Major Growth During 2021
Success continues for Openly, the premium homeowners insurance platform for independent agents, as it today announced an impressive 700% growth in in-force premium and 250% growth in the number of agents selling policies with the company year over year.
This growth is also supported by 113 new employees hired over the course of 2021 in all areas of the company. Openly has robust hiring plans for 2022 and expects to add over 100 additional employees this year.
Breathing Exercise - Google Search
Type in 'breathing exercise'
31-Day Full-Body Kettlebell Workout Program to Build Strength
This month-long, full-body kettlebell workout routine uses compound exercises to challenge you to move like an athlete.
The Warmup
Do these 2 movements as a circuit, with no rest between sets. Do 3 sets. 20 seconds per exercise.
- Chest-Supported Good Morning
- Bottoms-Up March
Strength Circuit 1
Do 3 sets of this circuit. Rest 45 seconds between moves, 90 seconds after each set.
- Dead-Stop Swing (8-10)
- Split Jerk (8-10 per side)
Strength Circuit 2
Do 3 sets of this circuit. Rest 45 seconds between exercises, 90 seconds after each set.
- Racked Reverse Lunge (8-10 per side)
- Staggered-Stance Deadlift (8-10 per side)
The Finisher
Do these 2 movements back-to-back with no rest between sets. Do as many sets as you can in 5 minutes
- Figure 8 to Hold (3 sets of 10)
- Kettlebell Clean (3 sets of 8)
Installing Window Trim the Easy Way: MDF Trim Molding (DIY)
Don't let the elegant look fool you. This trim is actually easier than the standard 'picture frame' trim used in most homes since the 1950s.
For this project, you'll need 1/2-in.- and 3/4-in.-thick MDF, and some paintable 1x3 lumber for the stools. We recommend wood for the stool because unlike MDF, it'll withstand a little moisture from window condensation. We used pine, but poplar, maple and birch would also work well.
You can figure out how much material you need using your cutting list, but as a rough estimate you can cut parts for about four or five windows from one 4 x 8-ft. sheet of MDF. MDF is heavy, and full sheets are hard to handle. Ask to have the sheets cut in half lengthwise at the home center.
Basic router bits: roundover, ogee, cove
Crypto Crash Course | coins.fyi | Cole South
Day 1 Security, Fundamentals, and Ethereum Learn how to set up a hardware wallet, purchase ETH on a centralized exchange, and use the Ethereum network. Day 2: NFTs 101 Register your first NFT, an ENS domain name. Navigate OpenSea: bid on, buy, and list an NFT for sale. Wrap up…
THUNDERCLUCK! — TUTOR TUESDAY INDEX
TUTOR TUESDAY INDEX Hey, friends! Here’s a handy little index to help you find tutorials you might be looking for! Drawing Exercises Part 1 Drawing Exercises Part 2 Foundations: • Visualizing in 3D •...
Building a Second Brain: The Illustrated Notes
In 2019 I took a course called Building a Second Brain by Tiago Forte. Throughout the course I illustrated summaries of the main concepts which you can find below.
Icon Font & SVG Icon Sets ❍ IcoMoon
IcoMoon provides a package of vector icons, along with a free HTML5 app for making custom icon fonts or SVG sprites. Browse among thousands of pixel perfect icons or import your own vectors.
What is Poka-Yoke? Mistake & Error Proofing | ASQ
Mistake-proofing or Poka-Yoke is a process analysis tools that either makes it impossible for an error to occur or makes the error immediately obvious once it has occurred.
More broadly, the term can refer to any behavior-shaping constraint designed into a process to prevent incorrect operation by the user.
"Idiot-proof"
Artvee
Browse and download high-resolution, public domain Paintings, Drawings, Illustrations and Posters.
sources:
https://artvee.com/about-us/
Yoga For Runners: 7 MIN PRE-RUN | Yoga With Adriene
7 MIN PRE RUN YOGA! The perfect and compact yoga practice to prepare the body for a jog or a run. Mindful and thorough. I've taken all your requests and put them into one practice. Warm it up and then go get em tiger!
Anti-Rotation Exercises | Anti-Rotation Core Workout for Runners
Anti-rotation exercises build core strength by helping you resist force pulling at your sides. Here's how that can make you a stronger runner.
- Bird Dog With Yoga Block
- Weighted Offset Dead Bug
- Plank Pillar March
- Pallof Press
- Single-Arm Press With Balance
- Single-Arm Swing
Men Over 40 Can Try the Poliquin Raise for Strong Shoulders
To set up, grab a pair of dumbbells. You'll be able to lift heavier weights than when you do a traditional lateral raise—but start light until you nail the form. Stand up straight and tall holding the weights, squeezing your glutes and abs to create full-body tension.
Start with four sets of six to eight reps.
How to Do the Half-Kneeling Kettlebell Windmill Abs Workout
The half-kneeling kettlebell windmill is a challenging abs exercise that you can do to work your core and build shoulder stability.
Three sets of six to eight reps should work, as each should take about two to three seconds to get through each rep.
