DBA Tips & Tricks: Query processing order. Taking yourself from good to great!

  1. FROM (& JOIN)
  2. WHERE
  3. GROUP BY
  4. HAVING
  5. WINDOW functions
  6. SELECT
  7. DISTINCT
  8. UNION
  9. ORDER BY
  10. LIMIT / OFFSET

FROM (& JOIN)

WHERE

SELECT * FROM CLIENTS WHERE SUM(AVALIBLE_ASSETS) > 0

GROUP BY

HAVING

SELECT COUNT(ClientId), AVALIBLE_ASSETS 
FROM CLIENTS
GROUP BY ClientId
WHERE SUM(AVALIBLE_ASSETS) > 0

WINDOW functions

SELECT

DISTINCT

UNION

ORDER BY

LIMIT / OFFSET

Conclusion

--

--

--

Developer (CRM/ERP/Process management software) C#.NET JavaScript & honestly whatever will get the job done!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

WebRTC VP8 Codec, Data Channel and 4K 60FPS Supports unleashed in Ant Media Server 2.0

Software Anti-Patterns

An impromptu test of Apple’s privacy claims thanks to Brave

The CI/CD Battle: Most Popular CI/CD Tools Comparison

Mystic NFT more coming characters

ESP32 Devlog 4 — I2C Liquid Crystal Display

Why @HRCrossingis different? 🤔

Moving from Jenkins Pipelines to DevOps Pipelines

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
Philip Pol

Philip Pol

Developer (CRM/ERP/Process management software) C#.NET JavaScript & honestly whatever will get the job done!

More from Medium

Two Quick Tips to Write Your Resume

SQL Revamp Journey Week 3

Northwind Database Schema Diagram

Evaluate and Improve

Why Your Business Problems Won’t Be Solved by Hiring a Data Analyst