Results

ARBQ
george_washingtonpartyindependent1
john_adamspartyfederalist1
thomas_jeffersonpartydemocratic_republican1
james_madisonpartydemocratic_republican1
james_monroepartydemocratic_republican1
john_quincy_adamspartydemocratic_republican1
andrew_jacksonpartydemocratic1
martin_van_burenpartydemocratic1
william_harrisonpartywhig1
john_tylerpartywhig1
james_polkpartydemocratic1
zachary_taylorpartywhig1
millard_fillmorepartywhig1
franklin_piercepartydemocratic1
james_buchananpartydemocratic1
abraham_lincolnpartyrepublican1
andrew_johnsonpartydemocratic1
ulysses_grantpartyrepublican1
rutherford_hayespartyrepublican1
james_garfieldpartyrepublican1
chester_arthurpartyrepublican1
grover_clevelandpartydemocratic1
benjamin_harrisonpartyrepublican1
william_mckinleypartyrepublican1
theodore_rooseveltpartyrepublican1
william_taftpartyrepublican1
woodrow_wilsonpartydemocratic1
warren_hardingpartyrepublican1
calvin_coolidgepartyrepublican1
herbert_hooverpartyrepublican1
franklin_rooseveltpartydemocratic1
harry_trumanpartydemocratic1
dwight_eisenhowerpartyrepublican1
john_kennedypartydemocratic1
lyndon_johnsonpartydemocratic1
richard_nixonpartyrepublican1
gerald_fordpartyrepublican1
james_carterpartydemocratic1
ronald_reaganpartyrepublican1
george_hw_bushpartyrepublican1
william_clintonpartydemocratic1
george_w_bushpartyrepublican1
barack_obamapartydemocratic1
donald_trumppartyrepublican1
joseph_bidenpartydemocratic1
federalistpartyvarious1
democratic_republicanpartyvarious1
democraticpartyvarious1
republicanpartyvarious1

Code

Memelang:  .party

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