{"stuId":2000,"stuCourse":"Snowflake"}

{"stuId":2000,"stuCourse":"Snowflake"}

How will you write a query that will check if stuId in JSON in #1 is also there in JSON in#2
A . with stu_demography as (select parse_json(column1) as src, src:stuId as ID from values(‘{"stuId":2000, "stuName":"Amy"}’)),
B. stu_course as (select parse_json(column1) as src, src:stuId as ID from values(‘{"stuId":2000,"stuCourse":"Snowflake"}’)) select case when stdemo.ID in(select ID from stu_course) then ‘True’ else ‘False’ end as result from stu_demography stdemo;
C. with stu_demography as (select parse_json(column1) as src, src[‘stuId’] as ID from values(‘{"stuId":2000, "stuName":"Amy"}’)), stu_course as (select parse_json(column1) as src, src[‘stuId’] as ID from values(‘{"stuId":2000,"stuCourse":"Snowflake"}’)) select case when stdemo.ID in(select ID from stu_course) then ‘True’ else ‘False’ end as result from stu_demography stdemo;
D. SELECT CONTAINS(‘{"stuId":2000, "stuName":"Amy"}’,'{"stuId":2000,"stuCourse":"Snowflake"}’);
E. with stu_demography as (select parse_json(column1) as src, src[‘STUID’] as ID from values(‘{"stuId":2000, "stuName":"Amy"}’)), stu_course as (select parse_json(column1) as src, src[‘stuId’] as ID from values(‘{"stuId":2000,"stuCourse":"Snowflake"}’)) select case when stdemo.ID in(select ID
from stu_course) then ‘True’ else ‘False’ end as result from stu_demography stdemo;

Answer: B,C

Explanation:

I would like you to try this out in your snowflake instance and find that out

Please note that this may not be the way the question will appear in the certification exam, but why we are still learning this?

Latest ARA-C01 Dumps Valid Version with 156 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments