<repo_name>raju080/MyGP-Database<file_sep>/DML.sql
INSERT INTO INTERNET_OFFER (OFFER_ID, PRICE, VALIDITY, REWARD_POINTS, DATA_AMOUNT) VALUES
(100, 56, 30, 0, 115),
(101, 31, 3, 25, 252),
(102, 10, 7, 0, 10),
(103, 101, 7, 0, 300);

INSERT INTO TALK_TIME_OFFER (OFFER_ID, PRICE, VALIDITY, REWARD_POINTS, TALK_TIME) VALUES
(200, 140, 7, 0, 250),
(201, 30, 1, 0, 50);

INSERT INTO SMS_OFFER (OFFER_ID, PRICE, VALIDITY, REWARD_POINTS, SMS_AMOUNT) VALUES
(300, 10, 2, 0, 20);

INSERT INTO PACKAGE (PACKAGE_ID, PACKAGE_NAME, CALL_RATE, SMS_RATE, data_rate, FNF_LIMIT) VALUES
(10, 'BONDHU', .275, .50, 1.5, 18),
(11, 'NISHCHINTO', .22, .50, 1.4, 0),
(12, 'DJUICE', .22, .50, 1.6, 13);

INSERT INTO STAR VALUES (1, 'PLATINUM_PLUS', 400, 180);
INSERT INTO STAR VALUES (2, 'PLATINUM', 300, 180);
INSERT INTO STAR VALUES (3, 'GOLD', 250, 180);
INSERT INTO STAR VALUES (4, 'SILVER', 200, 180);

INSERT INTO USERS VALUES
(01755840785, 13.4, 10, 185, 0, 'RAJU', 0, 0, 10, NULL, NULL),
(01787571129, 20.9, 50, 200, 0, 'TUSHAR', 5, 10, 11, 3, NULL),
(01787571128, 1000, 50, 200, 0, 'MARCHANT', 5, 10, 11, null, NULL);

<file_sep>/main.sql
CREATE DATABASE MYGP;
CREATE SCHEMA IF NOT EXISTS MYGP_SCHEMA;
drop schema MYGP_SCHEMA cascade;

DO  $$
BEGIN
  CALL PURCHASE_INTERNET_OFFER(103, 1787571128);
end;
$$;

