Question-22: You have been given below sample data with the millions of the rows
While designing data model we have below requirement which needs to be satisfied.
- We should be able to query table which can return n newest users in the group.
- Data should be evenly stored across the nodes in the cluster.
- Each new day there should be a new partition.
- Analytics group has huge volume of data compare to any other group.
- Query should be something like below
SELECT * FROM he_group WHERE coursegroup = ? LIMIT ?
- CREATE TABLE he_group (
coursegroup text,
subs_timeuuid timeuuid,
subscribed_date text,
username text,
email text,
first text,
last text,
location text,
PRIMARY KEY ( coursegroup , subs_timeuuid ), subscribed_date )
) WITH CLUSTERING ORDER BY subs_timeuuid DESC)
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Ans: C
Exp: As question is clearly saying that they wanted to query the n number of newest users in the group and not across the group. Hence, obvious column to think for ordering is timeuuid. As newest users, hence it should be order by desc for column subs_timeuuid. Hence,
You can access to full explanation to question and answer from this page.