Last active
August 2, 2019 14:12
-
-
Save olekscode/ed794037b4f14554a16a3c75973fa822 to your computer and use it in GitHub Desktop.
Example of using joins (inner, outer, left, right) with Pharo DataFrame. Customers and orders tables come from http://www.sql-join.com/sql-join-types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| customers | | |
customers := DataFrame | |
withRows: | |
#( ( 1 'George' 'Washington' 'gwashington@usa.gov' | |
'3200 Mt Vernon Hwy' 'Mount Vernon' | |
'VA' 22121 ) | |
( 2 'John' 'Adams' 'jadams@usa.gov' | |
'1250 Hancock St' 'Quincy' 'MA' 02169 ) | |
( 3 'Thomas' 'Jefferson' 'tjefferson@usa.gov' | |
'931 Thomas Jefferson Pkwy' | |
'Charlottesville' 'VA' 22902 ) | |
( 4 'James' 'Madison' 'jmadison@usa.gov' | |
'11350 Constitution Hwy' | |
'Orange' 'VA' 22960 ) | |
( 5 'James' 'Monroe' 'jmonroe@usa.gov' | |
'2050 James Monroe Parkway' | |
'Charlottesville' 'VA' 22902 ) ) | |
columnNames: | |
#( customer_id first_name last_name email address | |
city state zipcode ). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment