Hello all,
I am attempting to write SQL in the Command Text field for my Excel Data Connection to an Access Database. I have a long list of data and I would like to divide it up by quartiles. I am attempting the following SQL code but there is an error for Missing Operator or Invalid Syntax in the NTILE line.
Can someone help me with this NTILE SQL code? I am ultimately looking to get the values for the first and third quartiles in order to calculate the interquartile range. Thank you!
I am attempting to write SQL in the Command Text field for my Excel Data Connection to an Access Database. I have a long list of data and I would like to divide it up by quartiles. I am attempting the following SQL code but there is an error for Missing Operator or Invalid Syntax in the NTILE line.
Code:
SELECT *, NTILE(4) OVER ( ORDER BY Field1 DESC ) AS Quartile
FROM Table1
Can someone help me with this NTILE SQL code? I am ultimately looking to get the values for the first and third quartiles in order to calculate the interquartile range. Thank you!