0% found this document useful (0 votes)
911 views4 pages

Data Management and Basics: Submitted To: Angammal Shanthi Ma'am Submitted By: Simran Gupta Prabir Das Himanshu Nain

The document discusses SQL queries used in a final report project for a fashion technology course. It includes queries to find machines without table size data, join data from two tables, find average customer ratings grouped by machine type, extract cutting machines with over 1000 capacity, and get details for specific models. Macros are defined to navigate between a switchboard, final report, and individual model details.

Uploaded by

Siddharth Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
911 views4 pages

Data Management and Basics: Submitted To: Angammal Shanthi Ma'am Submitted By: Simran Gupta Prabir Das Himanshu Nain

The document discusses SQL queries used in a final report project for a fashion technology course. It includes queries to find machines without table size data, join data from two tables, find average customer ratings grouped by machine type, extract cutting machines with over 1000 capacity, and get details for specific models. Macros are defined to navigate between a switchboard, final report, and individual model details.

Uploaded by

Siddharth Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

NATIONAL INSTITUTE OF FASHION TECHNOLOGY

CHENNAI

DATA
MANAGEMENT AND
BASICS

Submitted To:
Angammal Shanthi ma’am
Submitted By:
Simran Gupta
Prabir Das
Himanshu Nain
BFTech Semester 3

Query

Queries made using SQL programming used in the process of final report
Syntax to find machines which don’t have table size that is no, ground space utilisation

SELECT Model_ID, Machine_ID, TypeOfMachine

FROM Machine

WHERE TableSize IS NULL AND weight<=100.0;

Query to join necessary data from 2 tables

INNER JOIN – will display only the rows or records where the joined fields from both tables
are equal.

SELECT Machine.Machine_ID, Machine.Model_ID, Machine.TypeOfMachine,


Model.CustomerRating, Model.efficiency, Model.speed, Machine.[cutting capacity],
Machine.price, Machine.HorsePower, Machine.operations, Model.[warranty/ guarantee],
Machine.[ease of operation], Brand.Brand_ID, Brand.[Warranty/ guarantee], Machine.colour

FROM ((Model INNER JOIN Brand ON Model.Model_ID = Brand.Model_ID) INNER


JOIN Machine ON Model.Model_ID = Machine.Model_ID) INNER JOIN Vendor ON
Model.Model_ID = Vendor.Model_ID;

Query to find the average of the grouped data

TRANSFORM - produces a crosstab query that lets you summarize a single value by
using the values found in a specified column or in an expression as the column headers
and using other columns or expressions to define the grouping criteria to form rows.

GROUP BY clause is a list of required values expected to be returned by the PIVOT expression.
TRANSFORM Avg([Important Data from all].CustomerRating) AS AvgOfCustomerRating

SELECT [Important Data from all].Model_ID

FROM [Important Data from all]

GROUP BY [Important Data from all].Model_ID

PIVOT [Important Data from all].TypeOfMachine;

Query to create a table with the average of customer rating of straight, round and band
knife respectively.

Avg- calculates the average of column values

SELECT Avg([straight knife]) AS StraightKnife, Avg([BAnd knife]) AS BandKnife,


Avg([Round knife]) AS RoundKnife

FROM [Customer rating individually];

Query to extract all the straight knife cutting machines with cutting capacity more than
1000.

SELECT Machine_ID, Model_ID, TypeOfMachine, [cutting capacity], HorsePower, [ease of


operation], efficiency, speed, operations

FROM [Important Data from all]

WHERE [cutting capacity]>1000;

Query to get all the features of straight knife cutting machines

SELECT Machine_ID, Model_ID, Brand_ID, TypeOfMachine, [cutting capacity],


HorsePower, [ease of operation], efficiency, speed, operations, price

FROM [Important Data from all]

WHERE TypeOfMachine='straight knife';


Query to get ll the details of the finalised products, blue steak 2 and Plastic Master
model.

SELECT [Final details data accumulation].Model_ID, [Final details data


accumulation].Brand_ID, [Final details data accumulation].TypeOfMachine, [Final details
data accumulation].[vendor address], [Final details data accumulation].maintenance, [Final
details data accumulation].[Delivery cost], [Final details data accumulation].price, [Final
details data accumulation].Outlets, [Final details data accumulation].[plug in supports], [Final
details data accumulation].[After sales service], [Final details data accumulation].[Warranty/
guarantee]

FROM [Final details data accumulation]

WHERE ((([Final details data accumulation].[Model_ID])='Blue Steak 2'));

Macros
1. “Go to Switchboard” – Returning back to switchboard from the given report.
Build event >> Add new action >> OpenForm >> Switchboard
2. “ Go to final report” – Returning back to final report from “Blue steak 2” and “Plastic
master”
3. “Blue Steak 2” and “Plastic Master” – opening details of these 2 models

You might also like