Hello,
in my University ive got this task:
ONE
red
green
brown
brown
TWO
purple
green
brown
my goal:
is get the colors who only shown once
with INNER RIGHT LEFT FULL JOIN
in this case
red
purple
i just wanna have a hint
wanna do the rest by my self 🙂
Thanks
SQL INNER JOIN Keyword (just google to study/learning examples) SAS is supporting Ansi SQL with some minor details being different.
That's quite a good task as it will make you dive into the workings of SQL. One way to go: FULL JOIN with a HAVING clause - and eventually a COALESCE() in the SELECT
Another option here: SAS(R) 9.2 SQL Procedure User's Guide
The following image may help you viisualize the various types of SQL joins...
Hi (suicidedoor?) - do you specifically have to use a JOIN clause. Your desired result could be achieved in SQL using SET operators.
You could perform a union all of one and two and then use a count function, group by and having clause to filter the results.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.