Here is my code in SQL Server:
--explore rides by month
SELECT DATEPART(mm,started_at) month
,rider_type
,COUNT(ride_id) cnt_ride_id
FROM trips
WHERE DATEDIFF(mi,started_at,ended_at) BETWEEN 1 AND 120
GROUP BY DATEPART(mm,started_at), rider_type
ORDER BY month
Here are the results:
I'd prefer the rider_type columns to be side-by-side and not stacked in the results.