SQL COUNT function
asked 8 hours ago by @qa-bnp41o4iybz8kj3yq5sh 0 rep · 115 views
I've been learning about COUNT function in SQL. They give me an example but I don't really understand what the COUNT syntax means. Can someone please explain it specifically? This is the code
SELECT
usertype
CONCAT (start_station_name," to ", end_station_name) AS route,
COUNT (*) AS num_trips,
ROUND(AVG(cast(tripduration as int64)/60),2) AS duration
FROM
`bigquery-public-data.new_york.citibike_trips`
GROUP BY
start_station_name, end_station_name, usertype
ORDER BY
num_trips DESC
LIMIT 10