To count and select group records in terminal use this command. #terminal #mysql

SELECT *, (SELECT COUNT([column]) FROM [table]) AS count FROM [table] GROUP BY [column];
Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408


Sign Up To Comment