Week 111 - SQL & Query Techniques

Did Shakespeare talk too much about love? At FROSTY_FRIDAY() we're feeling rather grumpy and want to know whether we're right in saying that the great playwright might've been a bit overly emotional.

Luckily, Snowflake has released the SEARCH() function for this very exact and specific use case.

Here we have 18 Shakespeare quotes:

with quotes as (
    select 'Better three hours too soon than a minute too late.' as quote
    union all
    select 'My words fly up, my thoughts remain below. Words without thoughts never to heaven go.'
    union all
    select 'Brevity is the soul of wit.'
    union all
    select 'Love looks not with the eyes, but with the mind; and therefore is winged Cupid painted blind'
    union all
    select 'Suit the action to the word, the word to the action.'
    union all
    select 'No legacy is so rich as honesty.'
    union all
    select 'All that glitters is not gold.'
    union all
    select 'Love all, trust a few, do wrong to none.'
    union all
    select 'Our doubts are traitors and make us lose the good we oft might win by fearing to attempt.'
    union all
    select 'Some are born great, some achieve greatness, and some have greatness thrust upon them'
    union all
    select 'To be or not to be: that is the question'
    union all
    select 'All the world’s a stage'
    union all
    select 'What, my dear Lady Disdain! Are you yet living?'
    union all
    select 'If music be the food of love, play on'
    union all
    select 'I cannot tell what the dickens his name is'
    union all
    select 'Shall I compare thee to a summer’s day?'
    union all
    select 'What’s in a name? A rose by any name would smell as sweet'
    union all
    select 'A horse! A horse! My kingdom for a horse!'
)

Use the SEARCH() function to tell us if the word 'love' appears in the quote. Your output should look like the below:

Previous
Previous

Week 112 - Geospatial

Next
Next

Week 110 - Administration