HI
I am a part of database testing team. I have imported a tables.csv file which contains two fields 1. table name- all the tables of a database 2. Primary column- primary column name of the respective tables.
I am trying to write a sql query for getting the table name, primary column ,count (primary column) from table name group by primary column ;
The challenge is i need to make a loop ,so that each time the table name and primary column has to be fetched from the tables.csv file.
So ,My final output has to be something like as below. The idea is to get the below value for all table names and its corresponding primary column as per tables.csv.
table name, primary column, count of primary column