SELECT Tags.TagName as TransportType, COUNT(DISTINCT Post...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Iota Meta

Q&A about the site for users of Iota, the open-source cryptocurrency for IoT that does not use a blockchain

SELECT 
    Tags.TagName as TransportType,
    COUNT(DISTINCT Posts.Id) as QuestionCount,
    AVG(CAST(Posts.Score as FLOAT)) as AvgScore,
    SUM(Posts.ViewCount) as TotalViews
FROM Posts
LEFT JOIN PostTags ON Posts.Id = PostTags.PostId
LEFT JOIN Tags ON PostTags.TagId = Tags.Id

WHERE Tags.TagName IN ('air-travel', 'trains', 'car-rentals', 'public-transport', 'cruise')
    AND Posts.PostTypeId = 1
GROUP BY Tags.TagName
ORDER BY QuestionCount DESC;

Enter Parameters

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