I would like to have Q1 and Q3 for the frequency column using standard sql.
Table name : table.frequency
Sample data:
What I did is:
SELECT (ROUND(COUNT(frequency) *0.25)) AS first_quarter,
(ROUND(COUNT(frequency) *0.75)) AS third_quarter
FROM table
And the results are not as I expected:
First quarter = 30577.0 Third quarter = 91730.0
Expected outcome is the 1st and 3rd quarter value for frequency column. Example : First quarter = 14 Third quarter = 51