Results

ARBQ
harvard'collegejohn_adams1
william_and_mary'collegethomas_jefferson1
princeton'collegejames_madison1
william_and_mary'collegejames_monroe1
harvard'collegejohn_quincy_adams1
hampden_sydney'collegewilliam_harrison1
william_and_mary'collegejohn_tyler1
chapel_hill'collegejames_polk1
bowdoin'collegefranklin_pierce1
dickinson'collegejames_buchanan1
west_point'collegeulysses_grant1
kenyon'collegerutherford_hayes1
harvard'collegerutherford_hayes1
williams'collegejames_garfield1
union'collegechester_arthur1
princeton'collegegrover_cleveland1
miami'collegebenjamin_harrison1
allegheny'collegewilliam_mckinley1
harvard'collegetheodore_roosevelt1
yale'collegewilliam_taft1
university_of_cincinnati'collegewilliam_taft1
princeton'collegewoodrow_wilson1
university_of_virginia'collegewoodrow_wilson1
ohio_central'collegewarren_harding1
amherst'collegecalvin_coolidge1
stanford'collegeherbert_hoover1
harvard'collegefranklin_roosevelt1
west_point'collegedwight_eisenhower1
harvard'collegejohn_kennedy1
southwest_texas_state_teachers'collegelyndon_johnson1
whittier'collegerichard_nixon1
duke'collegerichard_nixon1
university_of_michigan'collegegerald_ford1
yale'collegegerald_ford1
usa_naval_academy'collegejames_carter1
eureka'collegeronald_reagan1
yale'collegegeorge_hw_bush1
georgetown'collegewilliam_clinton1
oxford'collegewilliam_clinton1
yale'collegewilliam_clinton1
yale'collegegeorge_w_bush1
harvard'collegegeorge_w_bush1
occidental'collegebarack_obama1
columbia'collegebarack_obama1
harvard'collegebarack_obama1
university_of_pennsylvania'collegedonald_trump1
university_of_delaware'collegejoseph_biden1
syracuse'collegejoseph_biden1

Code

Memelang:  'college

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