Hi im looking to get how many users that use one app use that app
╔════════════════════════════════════════════════════════════════════════╗
║ username clientname date time publishedapp ║
╠════════════════════════════════════════════════════════════════════════╣
║ akirk hplaptop1 30/07/2015 8:42:30.04 PB Desktop service ║
║ john dellPC1 27/07/2015 9:41:30.04 desktop@Work2-1 ║
║ john dellPC1 27/07/2015 9:41:30.04 Word 2013 ║
║ karl delllaptop2 27/07/2015 9:40:21.00 Chrome ║
║ karl delllaptop2 27/07/2015 9:40:21.00 Desktop with acrobat ║
║ jdoe HPPC1 27/07/2015 9:40:15.00 Powerplan ║
║ mrt P2000 31/02/2015 10:03.20 PB Desktop service ║
╚════════════════════════════════════════════════════════════════════════╝
I would be specting something like this:
PB DEsktop service: 2
Powerplan: 1
I've managed to get
PB DEsktop service: 2
desktop@Work2-1: 1
Desktop with acrobat: 1
Chrome: 1
Word 2013: 1
Powerplan: 1
with this query:
SELECT publishedapp, COUNT(DISTINCT username) as cnt
FROM tbl_name
GROUP BY publishedapp
ORDER BY cnt DESC