Try this:
SELECT CONCAT('Change from ', OrgMatch, ' to ', ReMatchConfidence) AS Data,
Count(IF(Date="2017", 1, NULL)) as '2017',
Count(IF(Date="2016", 1, NULL)) as '2016'
FROM tables GROUP BY OrgMatch, ReMatchConfidence;
More Related Contents:
- Making a query with a single row out
- SQL IN Clause 1000 item limit
- How do you list the primary key of a SQL Server table?
- Calculating distance between two points (Latitude, Longitude)
- Passing an array of parameters to a stored procedure
- SQL Server : GROUP BY clause to get comma-separated values [duplicate]
- Return multiple columns of the same row as JSON array of objects
- Multiplication aggregate operator in SQL
- What’s the best way to join on the same table twice?
- How to log SQL statements in Grails
- The maximum recursion 100 has been exhausted before statement completion
- Delete duplicate records from a SQL table without a primary key
- Detect consecutive dates ranges using SQL
- MySQL equivalent of DECODE function in Oracle
- How do I select all the columns from a table, plus additional columns like ROWNUM?
- How can I use my sql knowledge with Cloudant/CouchDB?
- Why does SQL Server round off results of dividing two integers?
- How to Map Input and Output Columns dynamically in SSIS?
- Find the real column name of an alias used in a view?
- SQL Updating from an inner join
- Is it possible to query a comma separated column for a specific value?
- Venn Diagram for Natural Join
- What does a question mark represent in SQL queries?
- postgres – where in (list) – column does not exist
- incomplete information from query on pg_views [duplicate]
- How to create a pivot query in sql server without aggregate function
- SQL Server FOR XML Path make repeating nodes
- PostgreSQL nested INSERTs / WITHs for foreign key insertions
- IIS connecting to LocalDB
- Fetch records that are non zero after the decimal point in PostgreSQL