You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT
AGENCY_NAME,
IN_TWILIGHT,
COUNT(*) as N
FROM
(
SELECTmain.UNIQUE_ID,
main.AGENCY_NAME,
main.DATE_OF_STOP,
main.CLOSEST_CITY,
TIME_OF_STOP,
twilight.CTWILIGHT_BEGINas twilight_begin,
twilight.CTWILIGHT_ENDas twilight_end,
CASE
WHEN TIME_OF_STOP >twilight.CTWILIGHT_BEGINAND TIME_OF_STOP <twilight.CTWILIGHT_END THEN "Within civil twilight"
ELSE "in the dark..."
END as IN_TWILIGHT
FROM
aa_main_table as main
INNER JOIN civil_twilight_hours as twilight ONtwilight.DATE_OF_STOP=main.DATE_OF_STOPANDtwilight.CLOSEST_CITY=main.CLOSEST_CITY
)
GROUP BY
AGENCY_NAME, IN_TWILIGHT
The text was updated successfully, but these errors were encountered:
chekos
added
the
suggestion
A canned query suggestion (to be included by default in future deployment)
label
Jul 8, 2020
Stops within civil twilight by agency
query
The text was updated successfully, but these errors were encountered: