I have a table with various columns and values within them. I need SQL query to execute mismatch based on the below conditions:
a. Select only those records where there is a 15 digit ‘ColumnNumber’ populated i. Refine selection to return only the rows where ‘ColumnDate1’ is not equal to 'ColumnDate2'
b. Select records where ‘ColumnType’ equal either “CCRG” or “CCRL”
c. Match the output of ‘a’ & ‘b’ on ‘ColumnContract’, 'ColumnType’, ‘ColumnTypeGroup’,’ColumnDate1’, ‘ColumnDate2’, ‘ColumnNumber’
d. Report the mismatch