Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create database mydb;
- use mydb;
- insert into category(category_name,category_desc) values('Beauty, health and wellness', 'This is a description about bhw');
- insert into category(category_name,category_desc) values('Food and drinks', 'This is a description about fd');
- insert into category(category_name,category_desc) values('Travels', 'This is a description about travels');
- insert into category(category_name,category_desc) values('Fashion', 'This is a description about fashion');
- insert into category(category_name,category_desc) values('Other', 'This is a description about other');
- insert into seller values(1,'Mateja', 'Stefanovic', 'matke', 'matke', 'matke88@gmail.com', '0659213380');
- insert into seller values(2,'Petar', 'Mikic', 'mika', 'mika', 'mika@bgwellness.com', '0613388000');
- insert into seller values(3, 'Mirjana' , 'Spremic' , 'mira', 'mira', 'mira@moda.rs', '0670011304');
- insert into offer(offer_active,offer_created_date, offer_description, offer_expiration_date,
- offer_max_offers, offer_name, offer_purchased_offers, offer_regular_price, offer_sale_price, offer_valid_from, offer_valid_to, category_id, seller_id, cDate, eDate, vfDate, vtDate)
- values(true,NOW(), 'Chicken with peanut and vegetables 250 din instead 440 din, 2 for 400 din', NOW() + INTERVAL 5 DAY,
- 5, 'Chicken with peanut and vegetables 250 din instead 440 din', 0, 440, 250, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 30 DAY,2,1,null,null,null,null),
- (true,NOW(), 'Chicken with bamboo and brocolli 220 din instead 450 din, 2 for 380 din', NOW() + INTERVAL 6 DAY,
- 10, 'Chicken with bamboo and brocolli 220 din instead 450 din', 0, 450, 220, NOW() + INTERVAL 12 DAY, NOW() + INTERVAL 32 DAY,2,1,null,null,null,null),
- (true,NOW(), 'Imperial chicken only 300 din instead 600 din, 2 for 700 din', NOW() + INTERVAL 8 DAY,
- 30, 'Imperial chicken only 300 din instead 600 din', 0, 600,300, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,2,1,null,null,null,null),
- (true,NOW(), '4609 din for night, jakuzzi, champagne and 2 massages (60 min)', NOW() + INTERVAL 6 DAY,
- 8, '4609 din for night, jakuzzi, champagne and 2 massages', 0,9000, 4690, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,1,2,null,null,null,null),
- (true,NOW(), 'Trip to Krakow', NOW() + INTERVAL 6 DAY,
- 8, 'Trip to krakov (bus plus 2 nights)', 0, 12000, 6000 , NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,3,2,null,null,null,null),
- (true,NOW(), 'Trip to London', NOW() + INTERVAL 6 DAY,
- 2, 'Trip to krakov (bus plus 3 nights)', 0,12000, 6300, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,3,2,null,null,null,null),
- (true,NOW(), 'Trip to Amsterdam', NOW() + INTERVAL 6 DAY,
- 2, 'Trip to Amsterdam (bus plus 3 nights)', 0, 20000, 16300, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,3,2,null,null,null,null),
- (true,NOW(), 'Trip to Paradise for small amount of money', NOW() + INTERVAL 6 DAY,
- 11, 'Trip to Paradise (bus plus 3 nights)', 0, 600000,300000, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,3,2,null,null,null,null),
- (true,NOW(), 'Trip to India for small amount of money', NOW() + INTERVAL 6 DAY,
- 31, 'Trip to India (bus plus 3 nights)', 0, 60000 , 30000, NOW() + INTERVAL 10 DAY, NOW() + INTERVAL 40 DAY,3,2,null,null,null,null);
- insert into comment values(1, 'Ovo je proba za komentar',1,1);
- insert into comment values(2, 'Ovo je prvi komentar',1,1);
- insert into comment values(3, 'Ovo je drugi komentar',1,1);
- insert into comment values(4, 'Almost 1 million listeners for CHAPEAU CLAQUE & Pretty Pink - Schöner Moment @ La Belle Musique smile emoticon thank you for this great support ',1,1);
- insert into comment values(5, 'Ne čeka te večera posle radnog dana, sama spremaš? Koleginice, svaka čast... ',1,1);
- insert into admin values(1,'admin','admin','admin','admin');
- insert into buyer values(1,'branko', 'gvoka', 'bane', 'bane', 'tralala', 'bane92ru@gmail.com' , 'kao neka ulica');
- insert into branch values (1, 'Bulevar Vojvode Stepe br 18, Novi Sad', 'Kinezi 88', '0699333292',1);
- insert into branch values (2, 'Mise Dimitrijevica br 33, Novi Sad', 'Kinezi 888', '0699333294',1);
- insert into branch values (3, 'Kralja Petra br 111, Beograd', 'Kinezi 88Plus', '0699333252',1);
- select c.* from category c inner join offer o where c.category_name like 3 and o.offer_active is true;
- select * from offer o where o.category_id = 3 and o.offer_active is true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement