-
Hello. SELECT
id,
amount,
RANK() OVER (ORDER BY amount DESC) AS ranking
FROM
my_dataset.pos_data The RANK function seems to be parsed, but I don't know how to write it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hello. Summary(id:, amount:, ranking:) :-
my_dataset.pos_data(id:, amount:),
ranking == SqlExpr("RANK() OVER (ORDER BY amount DESC)", {}); which compiles to SELECT
my_dataset_pos_data.id AS id,
my_dataset_pos_data.amount AS amount,
RANK() OVER (ORDER BY amount DESC) AS ranking
FROM
my_dataset.pos_data AS my_dataset_pos_data; Please let me know if you have further questions. |
Beta Was this translation helpful? Give feedback.
-
@scottedwards2000 thanks for supportive feedback! |
Beta Was this translation helpful? Give feedback.
Hello.
Yes, you can!
Since we are still not sure what's the best syntax for those in Logica for now this part needs to be written in SQL with SqlExpr.
Here is how your query can be written:
which compiles to
Please let me know if you have further questions.