When you join two tables and you want to count only the first table, you can use the distinct command.
select a.OrderID, count(distinct a.Id) as Total from tblOrder a
inner join tblOrderDetail b on a.OrderID = b.OrderID
When you join two tables and you want to count only the first table, you can use the distinct command.
select a.OrderID, count(distinct a.Id) as Total from tblOrder a
inner join tblOrderDetail b on a.OrderID = b.OrderID
For further actions, you may consider blocking this person and/or reporting abuse
Okoye Ndidiamaka -
Scrapfly -
Shinetech Software -
Kshitij Raj Sharma -
Top comments (0)