Skip to content

Instantly share code, notes, and snippets.

@vingkan
Created December 6, 2017 00:11
Show Gist options
  • Save vingkan/c0a34612e6ecfb1a9a8b23e9adc0a3f0 to your computer and use it in GitHub Desktop.
Save vingkan/c0a34612e6ecfb1a9a8b23e9adc0a3f0 to your computer and use it in GitHub Desktop.
One set of solutions to the SoQL graphing activity from 11/28/2017 at ChiHackNight.
# Round 1: Create a pie chart of recent actions taken on pothole requests from October 2017.
SELECT most_recent_action, COUNT(*) AS total
WHERE most_recent_action != 'undefined'
AND creation_date >= '2017-10-01'
AND creation_date <= '2017-11-01'
GROUP BY most_recent_action
ORDER BY total DESC
# Round 2: Create a line chart of the number of potholes filled by creation date in October 2017.
SELECT creation_date, SUM(number_of_potholes_filled_on_block)
WHERE creation_date >= '2017-10-01'
AND creation_date <= '2017-11-01'
GROUP BY creation_date
ORDER BY creation_date ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment