My source data looks something like this (imagine there are thousands of records for each name, Im only showing the oldest and newest).
I want to convert it to this...
The data set is too big to dump into Excel so Im trying to figure out how to get min and max dates for Daily records and Monthly records side by side in SQL. I am able to get min and max dates if I query separately for D and then for M, but I want to do it all in one query.
I thought there was some way to use a SELECT as a column result within a larger overall select but I dont know how to do that. Or maybe a PIVOT? Im at a loss as to how to accomplish this.
I want to convert it to this...
The data set is too big to dump into Excel so Im trying to figure out how to get min and max dates for Daily records and Monthly records side by side in SQL. I am able to get min and max dates if I query separately for D and then for M, but I want to do it all in one query.
I thought there was some way to use a SELECT as a column result within a larger overall select but I dont know how to do that. Or maybe a PIVOT? Im at a loss as to how to accomplish this.