server/scripts/register/unpaid.sql

7 lines
320 B
MySQL
Raw Normal View History

2002-03-31 19:12:17 +02:00
select distinct u.id ID, concat(s.game, '/', s.faction) Partei, left(concat(firstname,' ',lastname, ' <',email,'>'),43) Name, sum(t.balance) Kontostand
2002-03-19 23:34:45 +01:00
from users u, transactions t, subscriptions s
where u.id=t.user and u.id=s.user
and s.status='ACTIVE'
2002-03-31 09:47:18 +02:00
GROUP BY s.faction
2002-03-31 19:12:17 +02:00
HAVING Kontostand<5;