Results

ARBQ
independent'partygeorge_washington1
federalist'partyjohn_adams1
democratic_republican'partythomas_jefferson1
democratic_republican'partyjames_madison1
democratic_republican'partyjames_monroe1
democratic_republican'partyjohn_quincy_adams1
democratic'partyandrew_jackson1
democratic'partymartin_van_buren1
whig'partywilliam_harrison1
whig'partyjohn_tyler1
democratic'partyjames_polk1
whig'partyzachary_taylor1
whig'partymillard_fillmore1
democratic'partyfranklin_pierce1
democratic'partyjames_buchanan1
republican'partyabraham_lincoln1
democratic'partyandrew_johnson1
republican'partyulysses_grant1
republican'partyrutherford_hayes1
republican'partyjames_garfield1
republican'partychester_arthur1
democratic'partygrover_cleveland1
republican'partybenjamin_harrison1
republican'partywilliam_mckinley1
republican'partytheodore_roosevelt1
republican'partywilliam_taft1
democratic'partywoodrow_wilson1
republican'partywarren_harding1
republican'partycalvin_coolidge1
republican'partyherbert_hoover1
democratic'partyfranklin_roosevelt1
democratic'partyharry_truman1
republican'partydwight_eisenhower1
democratic'partyjohn_kennedy1
democratic'partylyndon_johnson1
republican'partyrichard_nixon1
republican'partygerald_ford1
democratic'partyjames_carter1
republican'partyronald_reagan1
republican'partygeorge_hw_bush1
democratic'partywilliam_clinton1
republican'partygeorge_w_bush1
democratic'partybarack_obama1
republican'partydonald_trump1
democratic'partyjoseph_biden1
UNK'partyfederalist1
UNK'partydemocratic_republican1
UNK'partydemocratic1
UNK'partyrepublican1

Code

Memelang:  'party

SQL:  SELECT m0.bid AS aid, CONCAT("'", m0.rid) AS rid, m0.aid AS bid, m0.qnt AS qnt 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