Results

ARBQ
benjamin_harrisoncollegemiami1
calvin_coolidgecollegeamherst1
chester_arthurcollegeunion1
donald_trumpcollegeuniversity_of_pennsylvania1
dwight_eisenhowercollegewest_point1
franklin_piercecollegebowdoin1
george_hw_bushcollegeyale1
gerald_fordcollegeuniversity_of_michigan1
gerald_fordcollegeyale1
grover_clevelandcollegeprinceton1
herbert_hoovercollegestanford1
james_buchanancollegedickinson1
james_cartercollegeusa_naval_academy1
james_garfieldcollegewilliams1
james_madisoncollegeprinceton1
james_monroecollegewilliam_and_mary1
james_polkcollegechapel_hill1
john_tylercollegewilliam_and_mary1
joseph_bidencollegesyracuse1
joseph_bidencollegeuniversity_of_delaware1
lyndon_johnsoncollegesouthwest_texas_state_teachers1
richard_nixoncollegeduke1
richard_nixoncollegewhittier1
ronald_reagancollegeeureka1
thomas_jeffersoncollegewilliam_and_mary1
ulysses_grantcollegewest_point1
warren_hardingcollegeohio_central1
william_clintoncollegegeorgetown1
william_clintoncollegeoxford1
william_clintoncollegeyale1
william_harrisoncollegehampden_sydney1
william_mckinleycollegeallegheny1
william_taftcollegeuniversity_of_cincinnati1
william_taftcollegeyale1
woodrow_wilsoncollegeprinceton1
woodrow_wilsoncollegeuniversity_of_virginia1

Code

Memelang:  .college .college:harvard=f

SQL:  WITH z0 AS (SELECT * FROM meme m0 WHERE m0.rid='college' AND m0.qnt!=0), z1 AS (SELECT aid FROM z0 WHERE aid NOT IN (SELECT m0.aid as aid FROM meme m0 WHERE m0.rid='college' AND m0.bid='harvard' AND m0.qnt!=0)) SELECT * FROM z0 WHERE aid IN (SELECT aid FROM z1);

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