Weld logo
SQL TUTORIAL • LESSON 24, Tips & Tricks

The order of the elements in your query

In this section, you’ve learned a few new elements you can add to your queries, GROUP BY and ORDER BY, on top of the SELECT, FROM and WHERE that were introduced earlier. The order of these elements needs to be correct for a query to run. The order in which you write your query should always be as follows:

  1. SELECT
  2. FROM
  3. WHERE
  4. GROUP BY
  5. ORDER BY

Next up

LIMITing the amount of data with SQL

Go to lesson
Weld logo

Tired of scattered data? Build your data warehouse with Weld in minutes with our powerful ELT, SQL Transformations, Reverse-ETL and AI Assistant - connected to 100+ apps, files and databases.

Backed by leading investors
Frontline logoCherry logoInnnovation Fund logo
Twitter LogoLinkedIn Logo
GDPR logoSOC2
© 2024 Weld. All rights reserved.