Hello, I am new to SQL/HiveQL. Could you please advise on the below.
How can I create a table with 2 variables: ORG_ID (string) and TIME_PERIOD (date) like this:
ORG_ID | TIME_PERIOD C2222 | 2018-01-31 C2222 | 2018-02-28 C2222 | 2018-03-31 ... C2222 | 2021-05-31 C2222 | 2021-06-30 D3333 | 2018-01-31 D3333 | 2018-02-28 D3333 | 2018-03-31 ... D3333 | 2021-05-31 D3333 | 2021-06-30 W2345 | 2018-01-31 W2345 | 2018-02-28 W2345 | 2018-03-31 ... W2345 | 2021-05-31 W2345 | 2021-06-30
My 6 IDs: C2222, D3333, W2345, E2111, T7232, U8967
TIME_PERIOD contains the last day of each month between 2018-01-31 and 2021-06-30 (inclusive).
I don't have these variables created in the database, so first I need to create them. Can someone advise?
Thanks in advance.