1. Homepage
  2. Exam
  3. COMP2420/COMP6420 - 2020 Sample - Q2 Database Theory - SQL

COMP2420/COMP6420 - 2020 Sample - Q2 Database Theory - SQL

This question has been solved
Engage in a Conversation

Q2 Database Theory


b) SQL [9 Marks]

Now that you have finished the basics for which SQL is built upon, time to do the real thing. In psql, you have been provided a dataset for a set of banknotes that have the potental to be fake. The following schema applies: CourseNana.COM

Table: Banknotes

NameDescription
VarianceVariance of Wavelet Transformed Image (continous value)
SkewnessSkewness of Wavelet Transformed Image (continous value)
CurtosisCurtosis of Wavelet Transformed image (continous value)
EntropyEntropy of Image (continous value)
ClassClassification (Binary value)

For each of the following questions, provide the SQL query you used to get the answer, and the answer you received. CourseNana.COM

1) What is the total number of banknotes in the dataset?[1 mark] CourseNana.COM

2) What is the highest entropy of a banknote?[1 mark] CourseNana.COM

3) How many banknotes have a variance of higher than 0.5?[1 mark] CourseNana.COM

4) Find the range of the Curtosis column (where range is smallest_value subtracted from the largest_value). Provide the result.[3 marks] CourseNana.COM

5) Find the top 5 banknotes that have the highest combined total of skewness and entropy. Display the banknote's class and the combined value. CourseNana.COM

Get the Solution to This Question

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp