Created
December 12, 2023 08:16
-
-
Save sqlparser/0d566672d59d8833a6cc6edfac1d82aa to your computer and use it in GitHub Desktop.
Spark SQL Sample SQL
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
```sql | |
-- sparksql sample sql | |
CREATE TABLE person (id INT, name STRING, age INT, class INT, address STRING); | |
SELECT * FROM person | |
PIVOT ( | |
SUM(age) AS a, AVG(class) AS c | |
FOR name IN ('John' AS john, 'Mike' AS mike) | |
); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment