Pandas and Numpy Gold Badge Holders

0

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts Meta

Q&A about the site for enthusiasts and power users of the Android operating system

WITH pd AS (
  SELECT ROW_NUMBER() OVER (PARTITION BY b.name ORDER BY b.Date ) AS pd_rank 
        , u.displayname AS pd_user, u.reputation AS pd_rep
        , b.Name AS pd_tag, b.Date AS pd_date,
        case when b.class = 1 then 'gold'
        when b.class = 2 then 'silver'
        when b.class = 3 then 'bronze'
        end as pd_metal
  FROM badges b
  INNER JOIN users u 
   ON b.userid = u.id  
) 
  
SELECT pd.* 
FROM pd
where  pd_user = 'Patrick Artner' 
ORDER BY pd.pd_metal, pd.pd_rank

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results