Query tweater (3)
Suppose that you have a people table, with a bunch of information. This time, you want to find out the age and country of married males. Provided that there is a married column that's 1 when the person in question is married, the following query would work.
SELECT age, country
FROM people
WHERE gender = "male" AND married = 1
Can you use a similar approach for a more specialized query on the tweater database?
Este ejercicio forma parte del curso
Intermediate Importing Data in R
Instrucciones del ejercicio
- Create an R data frame,
specific, that selects themessagecolumn from thecommentstable where thetweat_idis 77 and theuser_idis greater than 4. - Print
specific.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Connect to the database
library(DBI)
con <- dbConnect(RMySQL::MySQL(),
dbname = "tweater",
host = "courses.csrrinzqubik.us-east-1.rds.amazonaws.com",
port = 3306,
user = "student",
password = "datacamp")
# Create data frame specific
# Print specific