Skip to content

list of users with the most druplicoins #1

@greggles

Description

@greggles

It would be great to show:

  • users with the most druplicoins in play
  • users with the most druplicoins in hand
  • users with the most druplicoins in play + in hand

Here are all three queries:
select sum(druplicoins), u.uid, u.name from (select sum(amount) as druplicoins, uid from pmb_bets p inner join field_data_field_question_status fqs on p.nid = fqs.entity_id where fqs.field_question_status_value = 1 group by uid union select sum(points) as druplicoins, uid from userpoints group by uid) tehsub inner join users u on tehsub.uid = u.uid group by u.uid, u.name ORDER BY SUM(druplicoins) DESC;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions