Question 46: You have been given below table definition
CREATE TABLE HADOOEXAM(
COURSE_TITLE text,
COURSE_ADDED_YEAR int,
COURSE_ADDED_DATE timestamp,
COURSE_DETAIL text,
USER_ID UUID,
COURSE_ID TIMEUUID,
PRIMARY KEY ((COURSE_TITLE),COURSE_ADDED_YEAR)));
What would be the result, when you run the below query?
SELECT * FROM HADOOEXAM WHERE COURSE_TITLE='CASSANDRA' AND COURSE_ADDED_YEAR <=2017;
What is the expected result?
- It will return all the courses which matches with the COURSE_TITLE='CASSANDRA' AND COURSE_ADDED_YEAR<=2017
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Correct Answer: 1
Explanation: As we have COURSE_ADDED_YEAR is a cluster key, hence query is correct. It is like range query on sorted column.
You can access to full explanation to question and answer from this page.