Skip to content

Tag: sql-server-2012

Counting totals on two separate SQL tables

I have two (identical for this purpose) tables ToDoList DoneList I’m trying to get a count from each of these per [ItemBatch] but not sure if that’s actually possible in one query? Separately I’d just do and assign to variables in the front-end so I could get the following: Is there a query …

How to find missing data in table Sql

This is similar to How to find missing data rows using SQL? and How to find missing rows (dates) in a mysql table? but a bit more complex, so I’m hitting a wall. I have a data table with the noted Primary key: I have a products table with all products, a countries table, and a calendar table with all