Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

From the Windows start menu click on SQL Server Management Studio. Login to the

ID: 3708148 • Letter: F

Question

From the Windows start menu click on SQL Server Management Studio.

Login to the database server.

From home enter:

For server type select Database Engine (which be the default).

At home your desktop or laptop will server as both the database client and the database server. For the server name enter the name of your desktop/laptop (it's probably filled in for you). You could also enter 127.0.0.1, which is the loop-back IP address that always points to your own machine.

At home select Windows Authentication.

You will not need to enter a user name or password. When you use Windows Authentication SQL Server uses the user name and password that you entered when you signed on to Windows.

n a SQL window in the appropriate database:

Click the plus sign next to Databases

Right click on the database you will be doing your homework in. At home it will be the database you created when setting up SQL Server. Never use the master database.

Click on New query

Run the following script in to setup the fuel prices tables:

Here is an ERD of the tables. Note that there are no foreign keys setup for these tables.

Write a query that shows all shows the year, item code, item name, and price attributes for the following rows that meet the following criteria:

Area code A207

The year is between 1985 and 1987

January only

Screenshot #3: Fuel Prices Query

Explanation / Answer

Please find the query below.

SELECT fi.ItemCode, fi.ItemName, fp.AreaCode, fp.DataYear, fp.PeriodCode, fp.Value FROM

FuelPrices fp, FuelPeriods fpr, FuelItems fi WHERE

fp.PeriodCode = fpr.PeriodCode AND fp.ItemCode = fi.ItemCode AND

fp.AreaCode = 'A207' AND fp.DataYear BETWEEN 1985 AND 1987 AND fpr.PeriodName = 'January';

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote