Template:Jam occurrence leaderboard/query: Difference between revisions

From VNDev Wiki
m cleaning up code
m get the "for" parameter working
Line 1: Line 1:
{{#ask: [[Jam occurrence:+]] [[Has end date::<Jan 24 2025]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}}
{{#ask: [[Jam occurrence:+]] [[Has end date::<Jan 24 2025]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}}
|?#-=jam
|?#-=jam
|?Has {{{2|entries}}}=count
|?Has {{{for|entries}}}=count
|template=Jam occurrence leaderboard/row-{{{2|entries}}}
|template=Jam occurrence leaderboard/row-{{{for|entries}}}
|format=plainlist
|format=plainlist
|sort=Has {{{2|entries}}}
|sort=Has {{{for|entries}}}
|order=descending  
|order=descending  
|limit=1
|limit=1
Line 13: Line 13:
<!-- The below section calculates the correct rank number by comparing to prior items  -->
<!-- The below section calculates the correct rank number by comparing to prior items  -->
|userparam={{#ifexpr: {{{1}}} = 1 | 1 |  
|userparam={{#ifexpr: {{{1}}} = 1 | 1 |  
     {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
     {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
       = {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-2}} }}
       = {{#ask: [[Jam occurrence:+]] |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-2}} }}
       | <!--At least two way tie; now test for three way tie-->
       | <!--At least two way tie; now test for three way tie-->
         {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
         {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
           = {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-3}} }}
           = {{#ask: [[Jam occurrence:+]] |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-3}} }}
           | {{#expr: {{{1}}}-2}}
           | {{#expr: {{{1}}}-2}}
           | {{#expr: {{{1}}}-1}}
           | {{#expr: {{{1}}}-1}}

Revision as of 19:02, 24 January 2025