Sharpen your SQL skills with our interactive exercises! Practice a wide range of SQL tasks, from basic queries to advanced techniques. Get immediate feedback on your solutions, helping you learn from mistakes and improve your skills. Boost your confidence for job interviews and real-world SQL applications.
I am writing to you today because I need your help.
SQLtest.online is a free platform designed to help people of all levels master SQL.
We offer a wide range of interactive tests, problems and training materials to help you improve your SQL skills.
The platform has already helped a lot of people, but we want to make it even better. And this is where you can help us!
How you can help:
Invite your friends and colleagues to join SQLtest.online!
Tell your friends and colleagues about SQLtest.online. Share a link to our site on social networks, by email or in person.
Write an article or blog post about SQLtest.online. Share your experience with the platform.
Together we can make SQLtest.online the best resource for learning SQL!
The more people use the platform, the better it will become. We'll be able to add more content, improve features, and create a better community for SQL enthusiasts.
The Sales department wants to send New Year's greetings to all customers residing in Texas. Write a SQL query to retrieve the names and addresses of these customers.
The query should output a table with two columns:
Name: A concatenated string of Title, FirstName, MiddleName, and LastName separated by spaces.
Address: A concatenated string of AddressLine1, AddressLine2, City, StateProvince and PostalCode separated by commas
Sort the result by the customer's LastName.
Write your request in the field below and click the "Check it!" button.
To write the answer, use SQL Server 2022 syntax. Descriptions of the tables are given in the right panel.
Explore over 280 diverse tasks on our platform.
Log in to save your progress.
AdventureWorks Database (SQL Server)
The AdventureWorks Database is a sample database that demonstrates the capabilities of SQL Server. It includes data
about
fictional manufacturing company.
ModifiedDate - timestamp of row creation or last update.
AddressID
AddressLine1
AddressLine2
City
StateProvince
CountryRegion
PostalCode
rowguid
ModifiedDate
9
8713 Yosemite Ct.
null
Bothell
Washington
United States
98011
268AF621-76D7-4C78-9441-144FD139821A
2006-07-01 00:00:00.000
Indexes:
PRIMARY KEY, btree (AddressID)
Table Customer
Columns:
CustomerID - a unique identifier for each customer.
NameStyle - 0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order.
Default: 0.
Title - title.
FirstName - name.
MiddleName - middle name.
LastName - last name.
Suffix - suffix.
CompanyName - company name.
SalesPerson - SalesPerson.
EmailAddress - E-mail.
Phone - phone number.
PasswordHash - password hash.
PasswordSalt - salt.
rowguid - rowguid.
ModifiedDate - timestamp of row creation or last update.
CustomerID
NameStyle
Title
FirstName
MiddleName
LastName
Suffix
CompanyName
SalesPerson
EmailAddress
Phone
PasswordHash
PasswordSalt
rowguid
ModifiedDate
1
0
Mr.
Orlando
N.
Gee
[null]
A Bike Store
adventure-works\pamela0
orlando0@adventure-works.com
245-555-0173
L/Rlwxzp4w7RWmEgXX+/A7cXaePEPcp+KwQhl2fJL7w=
1KjXYs4=
3F5AE95E-B87D-4AED-95B4-C3797AFCB74F
2005-08-01 00:00:00.000
Indexes:
PRIMARY KEY, btree (CustomerID)
Table CustomerAddress
Columns:
CustomerID - unique identifier of client in the table Customer.
AddressID - unique identifier of address in the table Address.
AddressType - address type.
rowguid - guid.
ModifiedDate - timestamp of row creation or last update.
CustomerID
AddressID
AddressType
rowguid
ModifiedDate
29485
1086
Main Office
16765338-DBE4-4421-B5E9-3836B9278E63
2007-09-01 00:00:00.000
Indexes:
PRIMARY KEY, btree (CustomerID, AddressID)
Table Product
Columns:
ProductID - a unique identifier for each product.
Name - product name.
ProductNumber - article number.
Color - product color.
StandardCost - product price.
ListPrice - product price in the catalogue.
Size - product size.
Weight - product weight.
ProductCategoryID - foreign key pointing to table ProductCategory - defines the product category.
ProductModelID - foreign key pointing to table ProductModel -
defines the product model.
SellStartDate - timestamp of the sales start date.
SellEndDate - timestamp of the sales end date.
DiscontinuedDate - timestamp of the sales end date.
ThumbNailPhoto - thumbnail photo of the product.
ThumbnailPhotoFileName - name of the photo thumbnail file.
rowguid - guid.
ModifiedDate - timestamp of row creation or last update.