Top 5 SQL tips I didn’t get in DS bootcamp

Things I only learned after a couple years on the job

Your mind visualizing a DB after 10 years writing SQL
Photo by fabio on Unsplash

1. Use ROW_NUMBER()

2. Calculate percentage columns during EDA

COUNT(*) / SUM(COUNT(*)) OVER() AS pct_of_total

3. User ORDER and LIMIT

ORDER BY 1 ASC LIMIT 15
GROUP BY 1,2,3,4,5,6 ORDER BY 1,2,3,4,5,6

4. Make use of the runtime indicator on your SQL host

5 Fix the cause of a million unhelpful error messages

Data scientist and pythonista, former fundraising analyst for Bernie 2020. I help non-profits improve their digital fundraising. For more go to shoveldata.me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store