Facebooktwittergoogle_plusredditpinterestlinkedinmail

Data can be grouped by “group by” key-word.

group by FieldName;

tbllibrary table structure and current status of the tbllibrary.

select * from tbllibrary;
tbllibrary

Group by the writer and count the records for each writer.

select writer, count(*) from tbllibrary group by writer;
Output

Explanation

There are four groups by “writer” in the table “tbllibrary”;