In this post, you'll see different type of SQL Queries that can be solved using basic SQL command like select, where clause and joins. For this queries we are going to use
JeffsBikes shop Database schema.
This is a sample assignment in Microsoft SQL Server or SQL server database to showcasing purpose to get clear understanding of SQL help request. This blog can helpful for SQL Practices.
Let's see the database tables:
Customers, Staff, Stores, orders, order_items, Category, Products, Stocks, Brands
Query 1:
Prepare a query result of customers with their first and last names, email, phone, and
state if the customer has no value in the field ‘phone’. The result set should show a
combined first and last name labeled as Full Customer Name and it should be sorted by
state. Use comments to describe this query result.
Query 2:
What are the list prices, product names and model years of the top 10 most expensive
products (according to their list price)?
Query 3:
List any product information available if the product has the word ‘townie’ anywhere in
the product name.
Query 4:
Create a query result that shows the Order Number, Required Date, Shipped Date and a
new column that shows the difference between the required date and the shipped date.
Only show instances where an order was shipped after the required date.
Query 5:
Create a query result that shows the states Jeff’s stores are located in.
Query 6:
List any March orders that are not from stores 1 and 3. Include Order ID, Order_Date
and Store_ID in the result set. Ensure that the date is formatted as MM-DD-YYYY.
Query 7:
Which customers are from New York and purchased an electric bike. Use
correlation/alias names in your joins.
Query 8:
Jeff’s Bike Shop management would like to see a result listing of all staff ids and staff
names if the staff member has ever sold to a customer from zip code 11418.
Query 9:
Create a result set that will answer the following business question: What stores have
any products in stock with a very low quantity? Jeff determines “very low quantity” as
being less than 4 products left in stock. Provide enough information in the output to be
a meaningful report to management.
Query 10:
Which customers have purchased both of these products from our company?
Surly Straggler 650b – 2016
Sun Bicycles Cruz 3 – 2017
The above queries are just basic one and our expert have solved all the queries on JeffsBikes Database schema. If you need in SQL server queries in JeffsBikes please contact us we offer solution at affordable price.
How Codersarts can help you in SQL Server?
SQL Server Assignment Help
Development project help in SQL Server
Query solving in SQL Server database
Mentorship in SQL Server from Experts
If you re looking for any kind of help in SQL Server, Contact us.
Comments