Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Custom logging
Loading Customers
Subscriptions
9. The subscription table
Congratulations

Instruction

Okay, let's see the second one! The subscription table is basically a junction (associative) table that contains primary keys from the newsletter and dim_customer tables along with a flag denoting whether a subscription is still active and a column indicating the last updated timestamp. See the subscription table structure below:

CREATE TABLE subscription (
  newsletter_id int NOT NULL,
  customer_id int NOT NULL,
  start_timestamp timestamp(0)
);

Exercise

Select all data from the subscription table. Note that the table is empty and ready for the next exercises.