Spark vs Java Spark Heuristic 3

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

with post_tag_bools as (
  select 
    p.id as post_id,
    max(case when t.TagName = 'apache-spark' then 1 else 0 end) as contains_spark,
    max(case when t.TagName = 'java' then 1 else 0 end) as contains_java,
    max(case when t.TagName = 'scala' then 1 else 0 end) as contains_scala
  from Posts as p
  left join PostTags pt on pt.PostId = p.Id
  left join Tags t on pt.TagId = t.Id
  group by p.id
)
select 
  count(*) as total_spark_questions,
  sum(contains_java) as total_spark_java_questions,
  sum(contains_scala) as total_spark_scala_questions
from post_tag_bools
where contains_spark = 1

Enter Parameters

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