Results

ARBQ
usa'countrygeorge_washington_birth1
usa'countryjohn_adams_birth1
usa'countrythomas_jefferson_birth1
usa'countryjames_madison_birth1
usa'countryjames_monroe_birth1
usa'countryjohn_quincy_adams_birth1
usa'countryandrew_jackson_birth1
usa'countrymartin_van_buren_birth1
usa'countrywilliam_harrison_birth1
usa'countryjohn_tyler_birth1
usa'countryjames_polk_birth1
usa'countryzachary_taylor_birth1
usa'countrymillard_fillmore_birth1
usa'countryfranklin_pierce_birth1
usa'countryjames_buchanan_birth1
usa'countryabraham_lincoln_birth1
usa'countryandrew_johnson_birth1
usa'countryulysses_grant_birth1
usa'countryrutherford_hayes_birth1
usa'countryjames_garfield_birth1
usa'countrychester_arthur_birth1
usa'countrygrover_cleveland_birth1
usa'countrybenjamin_harrison_birth1
usa'countrywilliam_mckinley_birth1
usa'countrytheodore_roosevelt_birth1
usa'countrywilliam_taft_birth1
usa'countrywoodrow_wilson_birth1
usa'countrywarren_harding_birth1
usa'countrycalvin_coolidge_birth1
usa'countryherbert_hoover_birth1
usa'countryfranklin_roosevelt_birth1
usa'countryharry_truman_birth1
usa'countrydwight_eisenhower_birth1
usa'countryjohn_kennedy_birth1
usa'countrylyndon_johnson_birth1
usa'countryrichard_nixon_birth1
usa'countrygerald_ford_birth1
usa'countryjames_carter_birth1
usa'countryronald_reagan_birth1
usa'countrygeorge_hw_bush_birth1
usa'countrywilliam_clinton_birth1
usa'countrygeorge_w_bush_birth1
usa'countrybarack_obama_birth1
usa'countrydonald_trump_birth1
usa'countryjoseph_biden_birth1

Code

Memelang:  'country

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="country" 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