Results

ARBQ
george_washingtonpresident_orderfirst1
john_adamspresident_orderfirst2
thomas_jeffersonpresident_orderfirst3
james_madisonpresident_orderfirst4
james_monroepresident_orderfirst5
john_quincy_adamspresident_orderfirst6
andrew_jacksonpresident_orderfirst7
martin_van_burenpresident_orderfirst8
william_harrisonpresident_orderfirst9
john_tylerpresident_orderfirst10
james_polkpresident_orderfirst11
zachary_taylorpresident_orderfirst12
millard_fillmorepresident_orderfirst13
franklin_piercepresident_orderfirst14
james_buchananpresident_orderfirst15
abraham_lincolnpresident_orderfirst16
andrew_johnsonpresident_orderfirst17
ulysses_grantpresident_orderfirst18
rutherford_hayespresident_orderfirst19
james_garfieldpresident_orderfirst20
chester_arthurpresident_orderfirst21
grover_clevelandpresident_orderfirst22
benjamin_harrisonpresident_orderfirst23
grover_clevelandpresident_ordersecond24
william_mckinleypresident_orderfirst25
theodore_rooseveltpresident_orderfirst26
william_taftpresident_orderfirst27
woodrow_wilsonpresident_orderfirst28
warren_hardingpresident_orderfirst29
calvin_coolidgepresident_orderfirst30
herbert_hooverpresident_orderfirst31
franklin_rooseveltpresident_orderfirst32
harry_trumanpresident_orderfirst33
dwight_eisenhowerpresident_orderfirst34
john_kennedypresident_orderfirst35
lyndon_johnsonpresident_orderfirst36
richard_nixonpresident_orderfirst37
gerald_fordpresident_orderfirst38
james_carterpresident_orderfirst39
ronald_reaganpresident_orderfirst40
george_hw_bushpresident_orderfirst41
william_clintonpresident_orderfirst42
george_w_bushpresident_orderfirst43
barack_obamapresident_orderfirst44
donald_trumppresident_orderfirst45
joseph_bidenpresident_orderfirst46

Code

Memelang:  .president_order

SQL:  SELECT * FROM meme m0 WHERE m0.rid='president_order' 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