Results
A | R | B | Q |
---|---|---|---|
john_adams | lawyer | various | 1 |
thomas_jefferson | lawyer | various | 1 |
james_madison | lawyer | various | 1 |
james_monroe | lawyer | various | 1 |
andrew_jackson | lawyer | various | 1 |
martin_van_buren | lawyer | various | 1 |
john_tyler | lawyer | various | 1 |
james_polk | lawyer | various | 1 |
millard_fillmore | lawyer | various | 1 |
franklin_pierce | lawyer | various | 1 |
james_buchanan | lawyer | various | 1 |
abraham_lincoln | lawyer | various | 1 |
rutherford_hayes | lawyer | various | 1 |
chester_arthur | lawyer | various | 1 |
grover_cleveland | lawyer | various | 1 |
benjamin_harrison | lawyer | various | 1 |
william_mckinley | lawyer | various | 1 |
william_taft | lawyer | various | 1 |
calvin_coolidge | lawyer | various | 1 |
franklin_roosevelt | lawyer | various | 1 |
barack_obama | lawyer | various | 1 |
Code
Memelang: .lawyer
SQL: SELECT * FROM meme m0 WHERE m0.rid='lawyer' AND m0.qnt!=0;
Memelang Demo
This is demonstration of translating Memelang to SQL for querying relational databases. See the PHP code in GitHub. A Python implementation is coming soon. Example queries:
Show all data in the database.
qry.all
All about George Washington.
george_washington
Who were children of the presidents?
.child
Which presidents were members of the Whig party?
.party:whig
Which presidents were born before 1820?
.birth.year:ad<1820
Which presidents attended Columbia and were lawyers?
.college:columbia .lawyer
Who were the spouses of the twentieth through thirtieth presidents?
.president_order>=20 .president_order<=30 .spouse
Which presidents did not have children?
.president_order .child=f
Use qry.all to return all memes related to the matching As.
.college:harvard .college:columbia qry.all
Get all about James Carter as well as Ronald Reagan.
james_carter;
ronald_reagan
Which presidents were lawyers that attended Harvard or William and Mary?
.lawyer .college:harvard=t1 .college:william_and_mary=t1
What were the professions of the presidents?
?profession
What were the professions of George Washington?
george_washington?profession
Which presidents previously worked for New York state?
new_york'?profession
Which presidents has children that became presidents?
.child.president_order