plus2net Home
HOME
PHP
JavaScript
HTML
Python
ASP
jQuery
C
PhotoShop
SQL
SQL Home
Database Basic
PHP MySQL
Date
Math
Select
Insert
Delete
Left Join
String
Search
Login
×
Login
Username
Password
Login
Contact Us
products sales and customers SQL dump ( Sample )
SQL
querying data
SELECT
WHERE
INNER JOIN
Copy to clipboard
CREATE TABLE IF NOT EXISTS `customers_v2` ( `c_id` int(1) DEFAULT NULL, `customer` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `customers_v2` -- INSERT INTO `customers_v2` (`c_id`, `customer`) VALUES (1, 'Rabi'), (2, 'Raju'), (3, 'Alex'), (4, 'Rani'), (5, 'King'), (7, 'Ronn'), (8, 'Jem'), (9, 'Tom'); -- -------------------------------------------------------- -- -- Table structure for table `products_v2` -- CREATE TABLE IF NOT EXISTS `products_v2` ( `p_id` int(1) DEFAULT NULL, `product` varchar(12) DEFAULT NULL, `price` int(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `products_v2` -- INSERT INTO `products_v2` (`p_id`, `product`, `price`) VALUES (1, 'Hard Disk', 80), (2, 'RAM', 90), (3, 'Monitor', 75), (4, 'CPU', 55), (5, 'Keyboard', 20), (6, 'Mouse', 10), (7, 'Motherboard', 50), (8, 'Power supply', 20); -- -------------------------------------------------------- -- -- Table structure for table `sales_v2` -- CREATE TABLE IF NOT EXISTS `sales_v2` ( `sale_id` int(1) DEFAULT NULL, `c_id` int(1) DEFAULT NULL, `p_id` int(1) DEFAULT NULL, `product` varchar(7) DEFAULT NULL, `qty` int(1) DEFAULT NULL, `store` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `sales_v2` -- INSERT INTO `sales_v2` (`sale_id`, `c_id`, `p_id`, `product`, `qty`, `store`) VALUES (1, 2, 3, 'Monitor', 2, 'ABC'), (2, 2, 4, 'CPU', 1, 'DEF'), (3, 1, 3, 'Monitor', 3, 'ABC'), (4, 4, 2, 'RAM', 2, 'DEF'), (5, 2, 3, 'Monitor', 3, 'ABC'), (6, 3, 3, 'Monitor', 2, 'DEF'), (7, 2, 2, 'RAM', 3, 'ABC'), (8, 3, 2, 'RAM', 2, 'DEF'), (9, 2, 3, 'Monitor', 2, 'ABC'), (10, 10, 20, 'USB', 2, 'ABC'), (11, 10, 21, 'pendriv', 1, 'DEF'), (12, 11, 22, 'Cable', 3, 'DEF');
«
SQL Inner Join
RIGHT JOIN
→
«
SQL
←
Subscribe to our YouTube Channel here
This article is written by
plus2net.com
team.
https://www.plus2net.com
Subscribe
*
indicates required
Email Address
*
First Name
Last Name
Subscribe to plus2net
plus2net.com
Share your comments, suggestions, issues, or requests here.
Detail
Queries
INSERT
UPDATE
Aggregate Queries
AVG ( Average )
SUM
MIN
MAX
SQL Video Tutorials
SQL Exercise
✖
We use cookies to improve your browsing experience. .
Learn more
HTML
MySQL
PHP
JavaScript
ASP
Photoshop
Articles
FORUM
.
Contact us
©
2000-2024
plus2net.com
All rights reserved worldwide
Privacy Policy
Disclaimer