Skip to content
Advertisement

Tag: count

Syntax for counting greater than and summing a value with multiple joins without the keyword having

I’m learning SQL (Postgres) and I’m slightly confused about something I’m trying to do. I have the following tables. Employee: Project: Department: And works_on: For this, I was trying to do something slightly more complex: To create a view that has project name, department name, number of employees, and total hours worked on each project that has the criteria of

Mysql query per date and per group

I have an SQL query which counts user uptake (registrations) by day for a particular group of users. It also does a cumulative (running total) This query is using the audit table purely to get me a list of dates reliable even if there are no users created on every day, i know the audit table with have a record.

Advertisement