Link to home
Start Free TrialLog in
Avatar of adznon
adznon

asked on

Sql question

SQL Table Coloums
GroupNumber
StoreNumber
AuditResponceMet
AuditStatus

Sample Data
GroupNumber / StoreNumber / AuditResponceMet / AuditStatus
1 / 1234 / N / Open
2 / 4567 / Y / Open
1 / 1234 / N Pending Approval
1 / 2544 / N / Pending Approval

Need to pull back all based on the group number

Distinct GroupNumber / Count Distinct Stores in group / Count Store Questions / Count AuditResponceMet = 'N' / Count AuditStatus = 'Pending Aproval'

Expected responce form sample data

1 / 2 / 3 / 3 / 2
2 / 1 / 1 / 0 / 0
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adznon
adznon

ASKER

Perfect, Many thanks
welcome. Glad to help as always. :)