with tag_combinations as ( select pt.postid, string_agg(t...

0

Please login or register to vote for this query.

(click on this box to dismiss)

English Language Learners

Q&A for speakers of other languages learning English

with tag_combinations as (
    select
        pt.postid,
        string_agg(t.tagname, ', ') within group (order by t.tagname) as tag_combination
    from posttags pt
    join tags t on pt.tagid = t.id
    group by pt.postid
),

tag_combination_count as (
    select
        tag_combination,
        count(postid) as post_count
    from tag_combinations
    group by tag_combination
)

select top 1
    tag_combination, 
    post_count
from tag_combination_count
order by post_count desc;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results