Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notice that the person with person_id 12 is associated with four distinct Simvastatin drug exposures. Write a query to show the four Simvastatin drug concepts

 Notice that the person with person_id 12 is associated with four distinct Simvastatin drug exposures. Write a query to show the four Simvastatin drug concepts for the individual with person_id 12. The query result should use "drug" as the column heading for the listed drugs. Hint: start with the query above and modify it. 

%%sql select drug_exposure.person_id, count(distinct drug_concept.concept_name) from drug_exposure inner join ( select concept_id, concept_name from concept where domain_id = 'Drug' and concept_name like '%Simvastatin%' ) as drug_concept on drug_exposure.drug_concept_id = drug_concept.concept_id group by drug_exposure.person_id limit 10;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions