Skip to content

Instantly share code, notes, and snippets.

@indy-singh
Created July 24, 2024 13:00
Show Gist options
  • Select an option

  • Save indy-singh/96e3414b2311527692d101cbcfd29625 to your computer and use it in GitHub Desktop.

Select an option

Save indy-singh/96e3414b2311527692d101cbcfd29625 to your computer and use it in GitHub Desktop.
SELECT count_dracula.count_dracula, substr(order_number::text, 5)::bigint
FROM generate_series(1, 10) count_dracula
LEFT JOIN public.indy_test ON 1 = 1 AND substr(order_number::text, 5)::bigint = count_dracula.count_dracula
WHERE 1 = 1
AND substr(order_number::text, 5)::bigint IS NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment