Feb 072014
 
select *
from   people
where  understanding_of_venn_diagrams = 'Y'
intersect
select *
from   people
where  understanding_of_sql = 'Y';

DESCRIPTION
-------------------------
People who understand this is 
a Venn diagram in disguise

  2 Responses to “SQL Venn Diagrams”

  1. Using INTERSECT there’s not much disguise, I’d say.
    Anyway, I think
    select *
    from people
    where understanding_of_venn_diagrams = ‘Y’
    AND understanding_of_sql = ‘Y’

    should be slightly more performant :)
    But there’s no Venn, then.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)