![]() RPostgreSQL :: dbGetQuery( conn = con, statement = 'select * from detroit ') # Year FTP UEMP MAN LIC GR CLEAR WM NMAN GOV HE WE # nursery higher internet romantic famrel freetime goout Dalc Walc health # guardian traveltime studytime failures schoolsup famsup paid activities # 10 GP F 15 U GT3 T 2 1 services other reputation # 9 GP F 15 U GT3 T 4 4 teacher health reputation # 7 GP M 15 U LE3 A 3 2 services other home # 6 GP F 17 U GT3 A 4 4 other teacher home # 3 GP F 15 U LE3 T 1 1 at_home other other # 2 GP F 17 U GT3 T 1 1 at_home other course # 1 GP F 18 U GT3 A 4 4 at_home teacher course RPostgreSQL :: dbGetQuery( conn = con, statement = 'select * from student WHERE NOT "Medu"=4 OR "Fedu"=4 LIMIT 10 ') # school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason The backslashes allow us to escape the single quotes that are necessary when using RPostgresql syntax. Here we tell SQL that we want all the G3 grades that are > 10 and also that the school should be GP OR Fedu should equal 4. Here we are looking at results where Fathers Education (Fedu) does not equal 4. # activities nursery higher internet romantic famrel freetime goout Dalc Walc # reason guardian traveltime studytime failures schoolsup famsup paid # 9 GP F 16 U GT3 T 4 4 services services ![]() RPostgreSQL :: dbGetQuery( conn = con, statement = 'select * from student where "G3"=4 OR "Medu"=4 LIMIT 10 ') # school sex age address famsize Pstatus Medu Fedu Mjob Fjob
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |