You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will use #14 , #26 , #16 and #17 query functions to get the length of each table to use in the stats board
// This is from a previous example you can use it as a referencerouter.get('/stats',(req,res)=>{getAllData().then(({ rows })=>console.log(rows.length))// this will log the length.catch((err)=>next(err));});
OR:
We can use the count function like this to count the number of rows per table
SELECTCOUNT(id)
FROM cohort
UNION ALLSELECTCOUNT(id)
FROM project
UNION ALLSELECTCOUNT(id)
FROM student
relates #5
Route:
GET api/v1/stats
Acceptance Criteria
DB query
We will use #14 , #26 , #16 and #17 query functions to get the length of each table to use in the stats board
OR:
We can use the
count
function like this to count the number of rows per tableResponse
Testing
to be a successful test
The text was updated successfully, but these errors were encountered: