I am running this query in Snowflake SQL
SELECT field('q', 's', 'q', 'l');
However I get this error:
SQL compilation error: Unknown function FIELD
Anyway I can find the position of something in an "IN" statement?
Ideally in a statement such as:
SELECT position_of_letter_in_in_statement, letter
from my_table a
where letter in ( 'q', 's', 'q', 'l');
with the output being as so:
position_of_letter_in_in_statement | letter
1 | 'q'
2 | 's'
3 | 'q'
4 | 'l'