I am trying to execute this sql:
select subject, class, book_name, author, publisher, publish_year from tb_books;
Now, what I want is distinct subject, as well as distinct class, as well as distinct book_name, and go on......
But, as we know if I use distinct with this query as below:
select distinct subject, class, book_name, author, publisher, publish_year from tb_books;
it will result in the complete distinct output of all the select statement.
Is their any way to find out all the distinct values. Please don't suggest to use the distinct query six times with all the columns (one for Class, one for book_name, one for author, etc).
Kindly revert.