I saw the question Write a While loop in Impala SQL?, but this doesn't address the "for" keyword.
Is "for" not used for looping? And if not, what is it used for? Something similar to "UNIQUE FOR"?
I saw the question Write a While loop in Impala SQL?, but this doesn't address the "for" keyword.
Is "for" not used for looping? And if not, what is it used for? Something similar to "UNIQUE FOR"?
SQL is a different sort of language, it doesn't have that sort of looping/iterative capability.
Treating data as blocks and your query acting over every record at the same time is a good approach conceptually.
If you haven't used it before it worthwhile knowing a bit about set logic