Selecting a distinct values and its number of occurrence from database using SQL $query=”SELECT DISTINCT(`page_id`), COUNT(page_id) as count FROM tablename group by page_id”;...Read More
Sample Query, here we select all page ids and its count but id except a particular number, Query inside braces of NOT IN condition: “SELECT `page_id`, COUNT(`page_id`) AS `total` FROM `table.com...Read More