Tricky query!
663575Oct 6 2008 — edited Oct 7 2008Hey! First time poster :D Hope you guys can help as I am really lost on how to do this.
Her is my problem. I have a table which holds some users data, email, name, permission etc
I have made this query:
select count(distinct(trim(mail))) total_users, groupsender from userstable group by groupsender order by total_users desc;
Ok this gives me a table with two columns, one for the total amount of users and the other with the groupsender.
Not my problem is that the firs column has the total users of the group, but what I must also get is the number of users that allow me to send them stuff and the problem with this is that it varies from group to group (don't ask me way, this was done before I got here). Like in one group the permission field will be "permission" in the other it will be "authorization".
So the real question here is can I show a third column where I show the total users that allow me to send them stuff.
I just ask because of the problem with the two ways of permitting to receive.
Hope someone can help me out here
Thanks :)