Connect to the gbif4crest_02 database by accessing the server on Amazon.
dbRequest(request, dbname = "gbif4crest_02")
A SQL request to be executed.
The name of the data source database.
The result of the request.
if (FALSE) {
# Extracting the number of taxa recorded in the database
dbRequest("SELECT count(*) FROM taxa")
# Extracting all the taxa that have at least one occurrence in South Africa.
southAfricaTaxa <- dbRequest(paste0(
"SELECT DISTINCT taxa.* ",
"FROM taxa, distrib_qdgc, geo_qdgc ",
"WHERE taxa.taxonid=distrib_qdgc.taxonid ",
"AND distrib_qdgc.latitude=geo_qdgc.latitude ",
"AND distrib_qdgc.longitude=geo_qdgc.longitude ",
"AND geo_qdgc.countryname='South Africa'"
))
head(southAfricaTaxa)
}