Select * to Get Started | Easy Solutions for Smarter SQL Part 4

Don't Use This Code • James Powell
221 views •

SQL isn't rocket science... but it could be. Rise to the challenge of data science. Join the DUTC Discord Server: https://discord.gg/ZhJPKYSfNp Sign up for DUTC Weekly: https://mailchi.mp/dutc/ytweekly LinkedIn: https://www.linkedin.com/company/do-n-t-use-this-code/ Website: https://www.dontusethiscode.com/index.html Upcoming events: learning.dutc.io Looking for training? Contact [email protected] This is part of the Easy Solutions for Smarter SQL series. In this series, we'll discuss how to construct simple select queries with group by and join clauses. We’ll discuss the underlying design of SQL, and how this influences our select statement (e.g., when and why do we use a where clause vs a having clause?). We’ll cover common extensions to select, such as the ability to union, intersect, and subtract (except) query results. Finally, we’ll discuss basic dynamic mechanisms (e.g., prepared statements, string interpolation, and dynamic SQL), their use and their fundamental limitations. In this series, we will aim to answer the following questions: - How do I query row-by-row, and what if I need to look at multiple rows at once? (simple select, limit, distinct, order by, group by, where vs having) - What complex expressions can I select? (null, is null, coalesce, case) - Do I care about data types? (json, jsonb, date/times, arbitrary precision numbers, enumerations, and ranges) - How do I query across multiple tables? (join, natural join, inner join vs outer join vs left join vs cross) - How do I combine multiple queries? (union, intersect, except)

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close