Mike Scalise

Mike Scalise

My thoughts on SQL Server, Project Management, Fitness, and all points in between

How to Increase Your Bench Press with Ed Coan’s Bench Press Routine

One of the most common questions strong-looking individuals get asked is, “How much can you bench?” The bench press is one of those exercises that has become the standard for gauging strength (and, some may argue, coolness) despite the fact that there’s so much more to weightlifting. And more specific than weightlifting in general, is powerlifting, which is comprised of the bench press, the squat, and the dead lift.

One of the most famous powerlifters of our time is Ed Coan. Coan set 71 records in his powerlifting career, which is an incredible feat. He is renowned as a legend in his sport, and his numbers prove it, with these single best lifts:

  • Squat: 981 lbs
  • Bench Press: 584 lbs
  • Dead Lift: 901 lbs

Suffice to say, he is a guy who knows what he’s talking about, and he has mentored numerous young lifters coming into the sport. Granted, he has failed drug tests in the past and been suspended and subsequently banned for life from the International Powerlifting Federation (IPF), but his training techniques are tried-and-true. My dad and I were fortunate enough to meet Ed Coan at the Arnold Classic in Columbus, OH in 2009.

My Dad and I with Ed Coan (middle)

I want to share with you Ed’s bench press training routine. It’s a 12-week cycle that consists of regular bench presses, narrow-grip bench presses, and incline presses. Simply download this spreadsheet and type in cell D1 your current one-rep max bench press (in lbs). The spreadsheet will do the rest and calculate the weight, number of reps, and number of sets you should be striving for across the three aforementioned pressing exercises.

If you find that you are not able to meet the goal for any of the exercises on a given week, lower your number in D1 accordingly and continue following the plan. This is a great routine for anyone looking to increase their bench press, so stick to it and be safe!

GREATEST / LEAST Function Alternatives in SQL Server

One of the most upvoted requests on feedback.azure.com is for Microsoft to add MAX/MIN as non-aggregate functions in SQL Server. In other words, the GREATEST and LEAST functions that we have been able to find in MySQL, PostgreSQL, and Oracle for a while.

These functions are fairly simple in nature. They’ll return the highest or lowest value from a list of values or fields. In other words, the greatest or least value out of values on the same row. So it’s a bit of a mystery why something so simple and readily available in other RDBMSes hasn’t been included in SQL Server…until now…kinda.

As of 4/14/21, Microsoft has officially announced that the GREATEST and LEAST functions are in Azure SQL Database and SQL Managed Instance. Unofficially, it seems they had silently included these functions in at least (no pun intended) SQL Managed Instance several months prior. In any case, here we are today with official Microsoft documentation on GREATEST and LEAST. This is all great news. What’s also great is that, in their statement, Microsoft stated they would be including these two functions in the next version of SQL Server.

But what about all of us on SQL Server 2019 and prior? Fortunately, there’s a way to mimic these two functions in your queries using a correlated subquery in the SELECT clause.

In the simplest form with just a list of static values, you can use this syntax:

SELECT (SELECT MAX(val) FROM (VALUES (10), (30), (20), (5)) val_tbl(val)) AS Greatest,
       (SELECT MIN(val) FROM (VALUES (10), (30), (20), (5)) val_tbl(val)) AS Least;

Here’s an example querying a table of values:

SELECT t.val1,
       t.val2,
       t.val3,
       (SELECT MAX(val) FROM (VALUES (t.val1), (t.val2), (t.val3)) val_tbl(val)) AS Greatest,
       (SELECT MIN(val) FROM (VALUES (t.val1), (t.val2), (t.val3)) val_tbl(val)) AS Least
FROM   (VALUES (151,275,179),
               (64,268,240),
               (216,29,156),
               (252,271,200)) t(val1, val2, val3);

Or, if you happen to have the Stack Overflow Database, you can try this example:

SELECT p.Id,
       p.AnswerCount,
       p.CommentCount,
       (SELECT MAX(val) FROM (VALUES (p.AnswerCount), (p.CommentCount)) val_tbl(val)) AS Greatest,
       (SELECT MIN(val) FROM (VALUES (p.AnswerCount), (p.CommentCount)) val_tbl(val)) AS Least
FROM   Posts p;

While it would’ve been great to have had these functions all along, I’m happy they’re on their way and that there’s a viable alternative in the meantime.