chore: bootstrap independent git workflow
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
11
examples/sql/postgres/happy_path_query.sql
Normal file
11
examples/sql/postgres/happy_path_query.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
SET search_path TO qa_demo;
|
||||
|
||||
SELECT
|
||||
a.id AS account_id,
|
||||
a.display_name,
|
||||
COUNT(t.id) AS ticket_count,
|
||||
SUM(CASE WHEN t.status = 'open' THEN 1 ELSE 0 END) AS open_ticket_count
|
||||
FROM accounts a
|
||||
LEFT JOIN tickets t ON t.account_id = a.id
|
||||
GROUP BY a.id, a.display_name
|
||||
ORDER BY a.id;
|
||||
Reference in New Issue
Block a user