Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query suggestion #30

Closed
chekos opened this issue Jul 7, 2020 · 1 comment
Closed

Query suggestion #30

chekos opened this issue Jul 7, 2020 · 1 comment
Labels
suggestion A canned query suggestion (to be included by default in future deployment)

Comments

@chekos
Copy link
Owner

chekos commented Jul 7, 2020

Civil Twilight draft

query

SELECT
  *
FROM (SELECT
  main.UNIQUE_ID,
  main.DATE_OF_STOP,
  main.CLOSEST_CITY,
  TIME_OF_STOP,
  twilight.CTWILIGHT_BEGIN as twilight_begin,
  twilight.CTWILIGHT_END as twilight_end,
  CASE WHEN TIME_OF_STOP > twilight.CTWILIGHT_BEGIN AND 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
  ON twilight.DATE_OF_STOP = main.DATE_OF_STOP
  AND twilight.CLOSEST_CITY = main.CLOSEST_CITY
)
@chekos chekos added the suggestion A canned query suggestion (to be included by default in future deployment) label Jul 7, 2020
@chekos
Copy link
Owner Author

chekos commented Jul 8, 2020

solved with #33, #34, and #32

@chekos chekos closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion A canned query suggestion (to be included by default in future deployment)
Projects
None yet
Development

No branches or pull requests

1 participant