-
-
Save shahnazmshariff/b75d7c372b9989cfbfc2e3d163917bab to your computer and use it in GitHub Desktop.
SQL blog example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUM(qty) FILTER (where type = 'domestic' and item = 'desk') AS desk_from_domestic, | |
SUM(qty) FILTER (where type = 'domestic' and item = 'bat') as bat_from_domestic | |
FROM purchases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment