5
submitted 1 year ago by yogthos@lemmy.ml to c/programming@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] zepplenzap@lemmy.sdf.org 0 points 1 year ago* (last edited 1 year ago)

It has been years since I wrote any SQL, so I may just be missing something but:

Why is the "As it could be" example for the second example using sub selects?!

Especially the one in the where clause where they are selecting two tables that they already joined in the from clause?

And wouldn't it be quicker to join the review table and use a group by?

[-] yogthos@lemmy.ml 0 points 1 year ago

I think the example is trying to optimize for readability to show that it can be pretty intuitive, but I think you're right.

this post was submitted on 17 Jun 2023
5 points (100.0% liked)

General Programming Discussion

7796 readers
7 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 5 years ago
MODERATORS