0

For an assignment, we are doing select statements using Shakespeare's works in PG Admin. I must find which character, and in what work, said a specific phrase. I'm stuck with the following code:

select workid, charid from paragraph

where plaintext like 'rose'

In which I'm trying to find who said "A rose by any other name would smell as sweet." Any tips?

1

Figured it out. Because the line given isn't the same as written, the following query worked:

select workid, charid, wordcount from paragraph
where plaintext like '%rose%'
and plaintext like '%other%'
and plaintext like '%name%'
and plaintext like '%smell%'
and plaintext like '%sweet%';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.