I have a table with muliple databases and each database has multiple tables with multiple rows based on dates. What I want to do is extract one database with distinct table values based on the max date for each table. an example is:
database tableName date
database A Table A 1/9/2023
database A Table A 1/16/2023
database A Table B 1/9/2023
database A Table B 1/16/2023
database A Table C 1/9/2023
database A Table C 1/16/2023
database B Table D 1/9/2023
database B Table D 1/16/2023
database C Table E 1/9/2023
Database C Table E 1/16/2023
The result I want is:
database Distinct Table Name Max Date
database A Table A 1/16/2023
database A Table B 1/16/2023
database A Table C 1/16/2023
I started with this this but not getting the outcome I want.