SAS Transpose to T-SQL Pivot

Hello Community,

I first want to apologise for the lack of information in this post that I'm about submit.

I have been given the task of doing a SAS Transpose of the following table

I am to use the following SAS code to transpose the table:

proc transpose
by pk_country_id fk_consumer_id wks_since;
id fuel_type;
var sales_quantity;
run;

Can someone let me know how complete the SAS code with T-SQL? I googled it and I think the equivalent is to do a PIVOT table, but I'm not sure how to go about doing that?

Again, sorry for the lack of information.

If you need anything else from me let me know.

Regards

Hi

Please take a look at the following link
Its very detailed and easy to follow

If you need help
please let me know
:slight_smile:
:slight_smile:

Hi Harishgg1,

I remember you from ExpertsExchange :slight_smile:

I'm going to check out the link.

Thanks for reaching out.

Cheers