Counting Enrolments current offer at Universidad Nacional de Loja with R and Pg


# Using a no recent Database backup

> install.packages('RPostgreSQL')
> library('RPostgreSQL')
> con <- dbConnect(PostgreSQL(),
+ user='xxxxx', password='xxxxxx',
+ host='XXXXXXX', dbname='sgalocal')
> rs <- dbSendQuery(con, 'Select count(*) from sga_model_matricula where oferta_academica_id = 84')
> df <- fetch(rs)
> df
count
1  6954