For me, it’s CTE’s. I find it amazing to complete a calculation with clear intermediate steps, and goes a long way towards convincing people to use SQL rather than Excel to perform calculations on large tables of data.

What construct do you like using on a daily basis?

  • key
    link
    fedilink
    41 year ago

    Subqueries in Subqueries in Subqueries

    • @megaman1970@beehaw.orgOP
      link
      fedilink
      11 year ago

      Those work, but require a lot of careful structuring to get right, and can be a pain to debug. With a CTE, you can just call on the intermediate steps to trace down problems.