🌐
W3Schools
w3schools.com › mysql › mysql_examples.asp
MySQL Examples
String Functions ASCII CHAR_LENGTH CHARACTER_LENGTH CONCAT CONCAT_WS FIELD FIND_IN_SET FORMAT INSERT INSTR LCASE LEFT LENGTH LOCATE LOWER LPAD LTRIM MID POSITION REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPACE STRCMP SUBSTR SUBSTRING SUBSTRING_INDEX TRIM UCASE UPPER Numeric Functions ABS ACOS ASIN ATAN ATAN2 AVG CEIL CEILING COS COT COUNT DEGREES DIV EXP FLOOR GREATEST LEAST LN LOG LOG10 LOG2 MAX MIN MOD PI POW POWER RADIANS RAND ROUND SIGN SIN SQRT SUM TAN TRUNCATE Date Functions ADDDATE ADDTIME CURDATE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURTIME DATE DATEDIFF DATE_ADD DATE_FORMAT DATE_
🌐
NTU Singapore
www3.ntu.edu.sg › home › ehchua › programming › sql › MySQL_Beginner.html
MySQL Tutorial - MySQL By Examples for Beginners
For example, mysql> CREATE DATABASE southwind; Query OK, 1 row affected (0.03 sec) mysql> DROP DATABASE southwind; Query OK, 0 rows affected (0.11 sec) mysql> CREATE DATABASE IF NOT EXISTS southwind; Query OK, 1 row affected (0.01 sec) mysql> DROP DATABASE IF EXISTS southwind; Query OK, 0 rows ...
Discussions

Sample DB
This might suit your needs. I wrote an app in Python that can generate a CRM and sales database with sample data. The readme is ok but PM me if you need help: https://github.com/cavebutter/datagen More on reddit.com
🌐 r/mysql
9
7
February 6, 2022
can somebody recommend a good site to practice mysql?
Most DBMSes come with sample databases. You can write lots of interesting queries against them, and usually a tutorial accompanies the database in the documentation. For MySQL, there's the Employees sample database: https://dev.mysql.com/doc/employee/en/ and also the Sakila sample database: https://dev.mysql.com/doc/sakila/en/ Also: Kaggle is full of sample data: https://www.kaggle.com/ Wikipedia publishes all of the content of Wikipeida as SQL scripts for MySQL, plus as XML files. You can get that data (or subsets of it) and play around. Load a small one or a huge one, get to work writing queries on it. Here's a github repository with lots of interesting data sets: https://github.com/awesomedata/awesome-public-datasets FiveThirtyEight has lots of neat sets: https://data.fivethirtyeight.com/ There's a website called "Relational Data Set Repository" which has bunches of sets: https://relational.fit.cvut.cz/ data.world has more than 30 data sets: https://data.world/datasets/database Someone manages this git repository that lists some interesting sets: https://github.com/joschout/RelationalDatasets More on reddit.com
🌐 r/mysql
8
9
February 10, 2022
Looking for MySQL Practice
This should be good for basics https://www.geeksengine.com/database/problem-solving/northwind-queries-part-1.php WHen youre ready to up your game you could get the stackoverflow database and then start doing more complicated exercises. i feel like it helps to have specific things listed out for you that you'd need to know about. So Here is a short list of things off the top of my head Islands and Gaps. Youll eventually need to know what this issue is and how to solve. Google it as its a pretty fun read in almost every article ive seen about it. Relational Division. Again another technique used to solve for specific criteria Pivoting data. Most o fthe time you'll wanna store data as rows, but sometimes the requirement is to display as columns. Knowing how to pivot data is important. Recursive CTE's. pretty simple stuff but knowing when its appropriate to use them is important. Different techniques to find duplicate data. Sub string extraction. Youre eventually going to run into shitty data and knowing how to find sub strings is going to be needed. Dynamic SQL and how to use it properly. I mainly mean how to use system table to help you build code that writes code for you. A lot of simple ETL procs can be written this way. it saves you time. Understanding window functions like ROW_NUMBER(), RANK() and DENSE_RANK(). I use these quite a bit for various different reasons. the PARTITION BY clause is something you should wrap your head aorudn. This is what I can think of right now. There's tons more, but these will keep you busy for a minute. More on reddit.com
🌐 r/SQL
13
4
November 17, 2021
How do you guys practise using MySQL
I'm going to go in a different direction than others suggesting leetcode here. Have you considered working on a small side project and using a local SQL-based database? You can import an existing dataset into one, and you will learn a lot from it. More on reddit.com
🌐 r/datascience
79
149
October 22, 2023
🌐
MySQL Tutorial
mysqltutorial.org › home › getting started with mysql › mysql sample database
MySQL Sample Database
December 29, 2023 - This page provides you with a MySQL sample database that helps you to practice with MySQL effectively and quickly.
🌐
NTU Singapore
www3.ntu.edu.sg › home › ehchua › programming › sql › SampleDatabases.html
MySQL Sample Databases
-- Example mysql> SELECT * FROM `Products by Category`; +----------------+----------------------------------+----------------------+--------------+--------------+ | CategoryName | ProductName | QuantityPerUnit | UnitsInStock | Discontinued | +----------------+------------------------------...
🌐
MySQL
dev.mysql.com › doc › mysql-tutorial-excerpt › 5.7 › en › examples.html
MySQL :: MySQL Tutorial :: 7 Examples of Common Queries
Some of the examples use the table shop to hold the price of each article (item number) for certain traders (dealers). Supposing that each trader has a single fixed price per article, then (article, dealer) is a primary key for the records. Start the command-line tool mysql and select a database:
🌐
MySQLCode
mysqlcode.com › home › mysql sample database – getting started with mysql databases
MySQL Sample Database - Getting Started With MySQL Databases - MySQLCode
June 24, 2022 - CREATE TABLE teacher( TID int(10), tname varchar(30), course varchar(5), education varchar(5); PRIMARY KEY(TID) ); This is how we create a database, remember we can perform any changes on these tables for now as we have created schemas only.
🌐
GitHub
github.com › Azure-Samples › mysql-database-samples › blob › main › mysqltutorial.org › mysql-classicmodesl.sql
mysql-database-samples/mysqltutorial.org/mysql-classicmodesl.sql at main · Azure-Samples/mysql-database-samples
June 15, 2026 - Name: MySQL Sample Database classicmodels · Link: http://www.mysqltutorial.org/mysql-sample-database.aspx · Version 3.1 · + changed data type from DOUBLE to DECIMAL for amount columns · Version 3.0 · + changed DATETIME to DATE for some colunmns · Version 2.0 ·
Author   Azure-Samples
🌐
MySQL
dev.mysql.com › doc › employee › en
MySQL :: Employees Sample Database
For legal information, see the Legal Notices · For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users
Find elsewhere
🌐
GitHub
github.com › datacharmer › test_db
GitHub - datacharmer/test_db: A sample MySQL database with an integrated test suite, used to test your applications and database servers · GitHub
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW ... If you are using MySQL client >= 9.x, the new default value of the --commands parameter is set to FALSE.
Starred by 4.4K users
Forked by 2.7K users
Languages   PLpgSQL 79.2% | Shell 20.8%
🌐
GitHub
github.com › hhorak › mysql-sample-db › blob › master › mysqlsampledatabase.sql
mysql-sample-db/mysqlsampledatabase.sql at master · hhorak/mysql-sample-db
Sample MySQL and MariaDB database data that can be used for upgrade testing - mysql-sample-db/mysqlsampledatabase.sql at master · hhorak/mysql-sample-db
Author   hhorak
🌐
MySQL
dev.mysql.com › doc › refman › 8.0 › en › examples.html
MySQL :: MySQL 8.0 Reference Manual :: 5.6 Examples of Common Queries
Some of the examples use the table shop to hold the price of each article (item number) for certain traders (dealers). Supposing that each trader has a single fixed price per article, then (article, dealer) is a primary key for the records. Start the command-line tool mysql and select a database:
🌐
MySQL
dev.mysql.com › doc › index-other.html
MySQL :: Other MySQL Documentation
The world's most popular open source database · Developer Zone Downloads MySQL.com · Documentation · Section Menu: Search · Other MySQL Documentation · This page provides additional documentation. There's even more available on these extra pages: Archives: the documentation archives ·
🌐
Quackit
quackit.com › mysql › tutorial › mysql_sample_database.cfm
MySQL Sample Database
You install the database by running the two SQL scripts (one for the DB structure, one for the data). Extract the two SQL scripts from the ZIP or TGZ file (they should be called sakila-schema.sql and sakila-data.sql) From MySQL Workbench, select File | Open SQL Script…
🌐
Devart
devart.com › dbforge › mysql › studio › create-database-in-mysql.html
How to Create a New Database in MySQL (Tutorial with Examples)
The article provides a detailed overview of how to create a database in MySQL using different methods and tools (including the Command Line, Workbench, and dbForge Studio for MySQL).
🌐
MySQL
dev.mysql.com › doc › mysql-tutorial-excerpt › 5.7 › en › database-use.html
MySQL :: MySQL Tutorial :: 4 Creating and Using a Database
You can use the test database (if you have access to it) for the examples that follow, but anything you create in that database can be removed by anyone else with access to it. For this reason, you should probably ask your MySQL administrator for permission to use a database of your own.
🌐
Devart
devart.com › dbforge › mysql › studio › mysql-sample-database.html
MySQL Sample Database - dbForge Studio Tutorial
Select and right-click the tables you want to retrieve data from in Database Explorer, then go to Send to > Query Builder. Next, on the diagram, select the columns you need to select data from and click Execute. If you switch to the Text view, you will see the auto-generated query. Note, that it contains a JOIN clause. You can update a record in a MySQL table using the SQL query. For example:
🌐
TutorialsPoint
tutorialspoint.com › java_mysql › java_mysql_sample_code.htm
Java & MySQL - Sample Code
This sample code has been written based on the environment and database setup done in the previous chapter. Copy and paste the following example in TestApplication.java, compile and run as follows − · import java.sql.*; public class TestApplication { static final String DB_URL = "jdbc:mysql://localhost/TUTORIALSPOINT"; static final String USER = "guest"; static final String PASS = "guest123"; static final String QUERY = "SELECT id, first, last, age FROM Employees"; public static void main(String[] args) { // Open a connection try(Connection conn = DriverManager.getConnection(DB_URL, USER, P
🌐
W3Schools
w3schools.com › php › php_mysql_create.asp
PHP MySQL Create Database
The SQL command CREATE DATABASE is used to create a database in MySQL.