Instances of packet statistics in Access
Squiring from: http://expert.9cbs.net/expert/topic/2727/2727523.xml? Temp = .1140711 Online table with field: Description: Username version is registered field: USR_NAME VER IsReg has the following table Record: AAA CN TRUE BBB CN FALSE CCC En True DDD fr True results Requirements: Query each version of registered users and unregistered users, draw the following structure: Version Registration number No registration CN 1 1 EN 1 0 fr 1 0
Ask the SQL statement in the Access 2000 environment
It is finally resolved in a few days:
1. MS SQL Server 2000: SELECT VER AS version, SUM (Case When IsReg = TRUE THEN 1 ELSE 0 END) AS Registration Quantity, SUM (Case When IsReg = False Then 1 ELSE 0 END) AS Unregistered Quantity from ONLINE GROUP BY version
2. Access 2000 Test passed: Select Distinct Ver AS version, (Select Count (*) from online where ver = m.ver and isreg = true) AS registration quantity, (Select Count (*) from online where ver = m. Ver and isreg = false) AS Unregistered Quantity from Online As M