This is how:
select count(*) as movies_count, year from movies group by year
More Related Contents:
- Most efficient way to get table row count
- Order by COUNT per value
- How to get the count of each distinct value in a column? [duplicate]
- Using column alias in WHERE clause of MySQL query produces an error
- How do I query between two dates using MySQL?
- Getting “Lock wait timeout exceeded; try restarting transaction” even though I’m not using a transaction
- Cannot delete or update a parent row: a foreign key constraint fails
- Using union and order by clause in mysql
- Using an Alias in SQL Calculations
- Can a table field contain a hyphen?
- OUTPUT Clause in MySQL
- Search all columns of a table using a single where condition with single keyword in mysql
- Using ORDER BY and GROUP BY together
- Sorting by date & time in descending order?
- Case statement in MySQL
- MySQL Pivot Table Column Data as Rows
- updating columns with a sequence number mysql
- MySQL, Concatenate two columns
- MySQL: Inner join vs Where [duplicate]
- Selecting from two tables with inner join and limit [duplicate]
- Use Composite Primary Key as Foreign Key
- Why the order of evaluation for expressions involving user variables is undefined?
- How to select data where a field has a min value in MySQL?
- How to SELECT by MAX(date)?
- get a recursive parent list
- How do you force mysql LIKE to be case sensitive? [duplicate]
- #1060 – Duplicate column name ‘id’
- In what order are MySQL JOINs evaluated?
- Update multiple rows with multiple ‘where’ clauses for each individual row
- ORDER BY alphabet first then follow by number