Skip to content

Commit

Permalink
Change to INNER JOIN
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoff committed Jul 1, 2019
1 parent a3c447e commit 2a79d1a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions oracle-ksql-elasticsearch/demo_oracle-streaming-etl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,16 @@ ksql> SELECT ID, FIRST_NAME, LAST_NAME, EMAIL, CLUB_STATUS FROM CUSTOMERS WHERE

[source,sql]
----
ksql> SELECT R.RATING_ID, R.MESSAGE,
SELECT R.RATING_ID, R.MESSAGE,
C.ID, C.FIRST_NAME + ' ' + C.LAST_NAME AS FULL_NAME,
C.CLUB_STATUS
FROM RATINGS R
LEFT JOIN CUSTOMERS C
ON R.USER_ID = C.ID
WHERE C.FIRST_NAME IS NOT NULL;
INNER JOIN CUSTOMERS C
ON R.USER_ID = C.ID;
----

[source,sql]
----
524 | Surprisingly good, maybe you are getting your mojo back at long last! | Patti Rosten | silver
525 | meh | Fred Blaisdell | bronze
526 | more peanuts please | Hashim Rumke | platinum
Expand All @@ -277,7 +280,7 @@ SELECT R.RATING_ID, R.MESSAGE, R.STARS, R.CHANNEL,
C.ID, C.FIRST_NAME + ' ' + C.LAST_NAME AS FULL_NAME,
C.CLUB_STATUS, C.EMAIL
FROM RATINGS R
LEFT JOIN CUSTOMERS C
INNER JOIN CUSTOMERS C
ON R.USER_ID = C.ID
WHERE C.FIRST_NAME IS NOT NULL;
Expand Down

0 comments on commit 2a79d1a

Please sign in to comment.