line graph select query integration