Hi all,
I have four proc sql create table statements, each succesive statement depends on the previous one. What I want to do is clean this up. I don't want it to show all three previous proc sql statement as a query expression but just the final one. This way the Process Flow workspace does not show three queries but just the final one that i need. Is there a statement that i can use that goes something like this:
proc sql;
create table work.query_For_TimeSegmentation_SUM as "Not Show"
The "Not Show" don't create a table?
Below are my proc sql codes:
proc sql;
create table work.query_For_TimeSegmentation as
select t1.PlayerID,
t1.'Time Segmentation'n,
(COUNT(DISTINCT(t1.DateKey))) as 'Count Distinct_of_Datekey'n
from WORK.FILTER_FOR_QUERY_FOR_FACTSLOTS t1
group by t1.PlayerID,
t1.'Time Segmentation'n
order by t1.PlayerID;
quit;
proc sql;
create table work.query_For_TimeSegmentation_SUM as
select t1.PlayerID,
SUM('Count Distinct_of_Datekey'n) as 'SUM_Trips'n
from work.query_For_TimeSegmentation t1
group by t1.PlayerID
order by t1.PlayerID;
quit;
proc sql;
create table work.query_For_TimeSegmentation_Join as
select t1.PlayerID,
t1.'Time Segmentation'n,
t1.'Count Distinct_of_Datekey'n,
t2.'SUM_Trips'n,
(t1.'Count Distinct_of_Datekey'n/t2.SUM_Trips) format=percent8.3 as '%TimeSegment'n
from work.query_For_TimeSegmentation t1
left join work.query_For_TimeSegmentation_SUM t2 on (t1.PlayerID = t2.PlayerID);
quit;
... View more