CREATE TABLE person (id INT, name STRING, date date, class INT, address STRING);
INSERT INTO person VALUES
(100, 'John', 30-1-2021, 1, 'Street 1'),
(200, 'Mary', 20-1-2021, 1, 'Street 2'),
(300, 'Mike', 21-1-2021, 3, 'Street 3'),
(100, 'John', 15-5-2021, 4, 'Street 4');
SELECT * FROM person
PIVOT (
**SUM(age) AS a, MAX(date) AS c**
FOR name IN ('John' AS john, 'Mike' AS mike)
);
这是上面的databricks sql代码,我如何在雪花中实现相同的逻辑