I am new to SQL and am using it for a school project and would like some help.
I have a table with multiple columns about a fictional company that provides a bike sharing service. One of the rows I am trying to count is called member_casual which returns a string with either casual or member, that reports whether a user is a member or not. The second column I am trying to count is a string column called rideable_type that reports what kind of bike it has. I want to create a table that returns the number of kinds of bikes per each kind or rider, casual or member.
Here is my code:
COUNT(member_casual) AS member_type,
COUNT(rideable_type) AS electric_classic
GROUP BY member_casual
Here is my result:
I know my code is flawed, but I do not know where it is flawed. I also do not know why I got the same number when I am counting two different columns (
rideable_type) which should be very different numbers.
I guess what I am asking is for assistance on where my code is wrong and how to fix it.