Skip to content
Advertisement

Tag: count

Group by not getting the expected results in mysql

I have the next query: That is working perfectly and returning 9 rows: I want to group the results by boat type and get the number of boats per type. However, when I do: I´m getting: but according to the first query, I´m expecting What am I missing? Answer I suspect that you want: That is: move the DISTINCT within

Inner join with Count, multiple tables

I’m having an issue with MS Access to get correct counts on multiple tables. I’m not at all an expert in SQL requests. I have a set of tables which is structured as follow : Table1 : UID, Name, other informations Table2 : UID, FK_UID_Table1, Name, other informations Table3 : UID, FK_UID_Table2, Name, other informations Table4 : UID, FK_UID_Table3, Name,

Mysql Group By age by range [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question i need help, i need to create report like this the report is group by the age, but i can’t get when age under <=

Selecting new distinct values over time (ORACLE SQL)

I want to select new distinct values and track them over time. I have a table where each row represents a score awarded to a particular person. – timestamp (when the score was awarded) – name (which person received the score) – score (what score the person received) I want the result to look like: The above table should be

Advertisement