Hacker News new | past | comments | ask | show | jobs | submit login

I'm not entirely sure I follow this. However, you might find it convenient to employ "common table expressions" (CTEs) in your queries:

  WITH cte_a AS
  (SELECT ... FROM something WHERE ...),
  cte_b AS
  (SELECT ... FROM something_else JOIN cte_a ON ... WHERE ...),
  ...
  SELECT whatever 
  FROM cte_z
     JOIN another_table ON ...
  WHERE ...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: