Recommendation

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

--This limits the results
    --It's sorting by the bar number, 
    -- so the query may get cut off like this one,
    -- which has 4 bars instead of 6.
    select top 5000
    
    --Here is the X axis. 
    --Each number is the bar that the result will be put in.
    (case 
        when lower(title) like '%open_source%' then 0
        when lower(title) like '%recommend%'   then 1    
        when lower(title) like '%free%'        then 2
        when lower(title) like '%good%'        then 2
        when lower(title) like '%best%'        then 2
        when lower(title) like '%better%'      then 2
        when lower(title) like '%any%'         then 2
        when lower(title) like '%what%should%' then 3
        when lower(title) like '%which%should%'then 3
        when lower(title) like '%is there%'    then 3
        when lower(title) like '%looking for%' then 4
        else 5 end
    ) AS newcolumnname
    
    --This is the first 25 characters of the title
    ,title--,left(title,25)
    
    --Here is the Y axis. It sorts by the X axis,
    -- and then just numbers upwards
 
    
    --This query searches posts
    from posts
    
    --This provides stricter criteria for the graph as a whole
    where (title like '%library%'
       or title like '%tool%'
       or title like '%book%'
       or title like '%tutorial%')
    and closeddate is null
    and deletiondate is null ;

Enter Parameters

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