This is a MYSQL question listed below.

We want to find out if there are more rides by usertype ‘Customer’ on weekends than on weekdays. We will answer this question in two steps. First, write a query which defines ‘RideType’ to be ‘Weekend’ if it is on a Saturday or Sunday and ‘Weekday’ otherwise (Hint - Using the citibikerides table, your output table should have three columns: usertype, starttime, and RideType).

SELECT
CASE
WHEN EXTRACT(ISODOW FROM starttime) IN (0,6) THEN 'Weekend'
ELSE 'Weekday'
END AS RideType,
COUNT(*) AS NumRides
FROM
citibikerides
WHERE
usertype = 'Customer'
GROUP BY
RideType