Skip to content

Instantly share code, notes, and snippets.

@Mr--John-Doe
Created November 24, 2021 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mr--John-Doe/7a76962e3fbba4aa40dc0f7b85e76c50 to your computer and use it in GitHub Desktop.
Save Mr--John-Doe/7a76962e3fbba4aa40dc0f7b85e76c50 to your computer and use it in GitHub Desktop.
How To Do For Loops in SQL - 2
INSERT INTO result
SELECT p_date, ...
FROM ... JOIN ...
INNER JOIN DATE_LIST
ON dt between trunc('month', p_date) and p_date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment