Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
SELECT city_sel AS city FROM Sellers UNION ALL SELECT city_cust AS city FROM Customer ORDER BY city DESC
CREATE TABLE Products (prod_id int PRIMARY KEY not null,
name nvarchar(50) null,
price int null,
description nvarchar(50) null)
CREATE TABLE Sell_2015 (id_sel int PRIMARY KEY not null,
prod_id int not null,
count int null,
sel_date date)
CREATE TABLE Sell_2016 (id_sel int PRIMARY KEY not null,
prod_id int not null,
count int null,
sel_date date)
CREATE TABLE Sell_2017 (id_sel int PRIMARY KEY not null,
prod_id int not null,
count int null,
sel_date date)
INSERT INTO Products (prod_id, name, price, description) VALUES
(1, 'Notebook Asser15.6 intel core i5', 500, 'ddr 500'),
(2, 'Notebook Asser13.3 intel core i5', 600, 'ssd 125'),
(3, 'Notebook Asser13.3 intel core i7', 750, 'ssd 250'),
(4, 'Notebook HP13.3 intel core i7', 800, 'ssd 250'),
(5, 'Notebook HP15.6 intel core i7', 600, 'ddr 1trb'),
(6, 'Mouse laser', 10, 'Geniuse'),
(7, 'Mouse Bletooth', 15, 'HP')
INSERT INTO Sell_2015 (id_sel, prod_id, count, sel_date) VALUES
(1, 1, 1, '2015-04-01'),
(2, 3, 1, '2015-08-25'),
(3, 6, 5, '2015-10-10'),
(4, 2, 1, '2015-10-25'),
(5, 7, 3, '2015-12-23')
INSERT INTO Sell_2016 (id_sel, prod_id, count, sel_date) VALUES
(1, 2, 1, '2016-02-12'),
(2, 3, 2, '2016-02-26'),
(3, 4, 1, '2016-04-12'),
(4, 5, 2, '2016-06-20'),
(5, 8, 4, '2016-09-23')
INSERT INTO Sell_2017 (id_sel, prod_id, count, sel_date) VALUES
(1, 1, 1, '2017-04-12'),
(2, 4, 1, '2017-05-26'),
(3, 5, 1, '2017-07-12'),
(4, 7, 5, '2017-09-20')
SELECT name, id_sel, sel_date, count FROM Products, Sell_2015 UNION
SELECT name, id_sel, sel_date, count FROM Products, Sell_2015 WHERE Sell_2015.prod_id = Products.prod_id UNION
SELECT name, id_sel, sel_date, count FROM Products, Sell_2016 WHERE Sell_2016.prod_id = Products.prod_id UNION
SELECT name, id_sel, sel_date, count FROM Products, Sell_2017 WHERE Sell_2017.prod_id = Products.prod_id
SELECT name, id_sel, sel_date, count FROM Products, Sell_2015 UNION ALL
SELECT name, id_sel, sel_date, count FROM Products, Sell_2015 WHERE Sell_2015.prod_id = Products.prod_id UNION ALL
SELECT name, id_sel, sel_date, count FROM Products, Sell_2016 WHERE Sell_2016.prod_id = Products.prod_id UNION ALL
SELECT name, id_sel, sel_date, count FROM Products, Sell_2017 WHERE Sell_2017.prod_id = Products.prod_id
SELECT name, id_sel, sel_date, count FROM Products, Sell_2017 WHERE Sell_2017.prod_id = Products.prod_id
![]() |
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team