Assignment Queries

In: Computers and Technology

Submitted By f2kboost
Words 646
Pages 3
1. SELECT CustomerNum, CustomerName
FROM Customer;
Query1
CustomerNum CustomerName
148 Al's Appliance and Sport
282 Brookings Direct
356 Ferguson's
408 The Everything Shop
462 Bargains Galore
524 Kline's
608 Johnson's Department Store
687 Lee's Sport and Appliance
725 Deerfield's Four Seasons
842 All Season

2. SELECT *
FROM Part;
Query1
PartNum Description OnHand Class Warehouse Price
AT94 Iron 50 HW 3 $24.95
BV06 Home Gym 45 SG 2 $794.95
CD52 Microwave Oven 32 AP 1 $165.00
DL71 Cordless Drill 21 HW 3 $129.95
DR93 Gas Range 8 AP 2 $495.00
DW11 Washer 12 AP 3 $399.99
FD21 Stand Mixer 22 HW 3 $159.95
KL62 Dryer 12 AP 1 $349.95
KT03 Dishwasher 8 AP 3 $595.00
KV29 Treadmill 9 SG 2 $1,390.00

3. SELECT CustomerNum, CustomerName
FROM Customer
WHERE RepNum='35';
Query1
CustomerNum CustomerName
282 Brookings Direct
408 The Everything Shop
687 Lee's Sport and Appliance
725 Deerfield's Four Seasons

4. SELECT CustomerNum, CustomerName
FROM Customer
WHERE RepNum='35'
AND CreditLimit=10000;
Query1
CustomerNum CustomerName
282 Brookings Direct

5. SELECT CustomerNum, CustomerName
FROM Customer
WHERE RepNum='35'
OR CreditLimit=10000;
Query1
CustomerNum CustomerName
282 Brookings Direct
408 The Everything Shop
462 Bargains Galore
608 Johnson's Department Store
687 Lee's Sport and Appliance
725 Deerfield's Four Seasons

6. SELECT OrderNum, OrderDate, Orders.CustomerNum, CustomerName
FROM Orders, Customer
WHERE Orders.CustomerNum = Customer.CustomerNum;
Query1
OrderNum OrderDate CustomerNum CustomerName
21608 10/20/2013 148 Al's Appliance and Sport
21619 10/23/2013 148 Al's Appliance and Sport
21614 10/21/2013 282 Brookings Direct
21610 10/20/2013 356 Ferguson's
21613 10/21/2013 408 The Everything Shop
21617 10/23/2013 608 Johnson's Department Store
21623 10/23/2013 608 Johnson's Department Store…...

Similar Documents

Assignment 3: Oracle Table and Query

...Assignment 3: Oracle Table and Query Arthur David Knowles Professor Murnane CIS 111 Strayer University 10, 29, 2012 Assignment 3: Oracle Table and Query Today we are going to learn how to do a couple basic things within Oracle. We are going to create a table with three columns and we are going to input five records into it. When we are all done you will be able to create a table, insert data and use a query to find the data. Now let us get started! First launch the putty application and open the one for our class that we created week one. Sign into Oracle until you reach the prompt that reads SQL>. For this example I am going to use NFL quarterbacks for our table creation. Once you have arrived at the SQL prompt type in the following command line, create table NFLQBS ( , then hit enter, you should see a 2 on the left side, on the following lines we will create the columns. On line 2 type in, Player_Team varchar(30), then hit enter. On line 3 type in Player_Name varchar(30), hit enter again. Then on line 4 type in Player_Number varchar(5); and hit enter. If done correctly it should read, “Table Created”. The picture above shows where we should be. I will now explain a few of the things we just did in detail. First command we used was Create Table, this is used to create the base table that forms the heart of our relational database. The number in parentheses is used to set how many character can be used in that column. Now we will move onto inserting......

Words: 491 - Pages: 2

Queries

...  Assignment #7 – Queries A query expressed in a high-level query language such as SQL must first be scanned, parsed, and validated. The scanner identifies the language tokens, such as SQL keywords, attributes names, and relation names in the text of the query, whereas the parser checks the query syntax to determine whether it is formulated according to the syntax rules of the query language. The query must also be validated, by checking that all attribute and relation names are valid and semantically meaningful names in the schema of the particular database being queried. An internal representation of the query is then created, usually as a tree data structure called a query tree. It is also possible to represent the query using a graph data structure called a query graph. The DBMS must then devise an execution strategy for retrieving the result of the query from the database files. A query typically has many possible execution strategies, and the process of choosing a suitable one for processing a query is known as query optimization. Optimization in a database makes things work smoothly. One heuristic rule is to use SELECT operation before using the JOIN or other Binary operations. This is because the resultant size of the file from a Binary operation such as JOIN is usually a multiplicative function of the sizes of the input files. So, The SELECT operation reduces the size of a file so it must be used before the JOIN or other binary Operation. Secondly, we can......

Words: 345 - Pages: 2

Outer Join and Scalar Queries

...Write the following queries in SQL: Display a list of all instructors, showing their ID, name, and the number of sections that they have taught. Make sure to show the number of sections as 0 for instructors who have not taught any section. Your query should use an outer join, and should not use scalar subqueries. By using the university schema provided by db-book.com the following queries were done on the university database. The first query uses an outer join which works similar to the join operation but it keeps the rows that don’t match between the two tables that would be lost in a join operation. There are three forms of outer join: a) Left outer join displays the results from the left table even if the condition does not find any matching record in the right table. b) Right outer join will displays the results from the right table regardless if there is matching data in the left table. c) Full outer join will retain all rows from both tables, regardless if the data matches or not. The group by clause when used in a select statement collects data from multiple records and groups the results into one or more columns. The below is the query using left outer join operation: select ID, name, count(sec_id) as Number_of_sections from instructor natural left outer join teaches group by ID, name; The next query was written by using a scalar subquery without using an outer join operation. A scalar subquery is where the output of a subquery returns......

Words: 414 - Pages: 2

Sql Query Design

...Assignment 1: SQL Query Design Diane King June 24, 2014 IT526-01 SQL Query Design Pr4ofessor: Jon McKeeby, DSc. Kaplan University Part1. Install SQL Express Part2. Questions. a. Each CHAR and VARCHAR store non binary strings characters as the maximum length allowed. The difference between the two is the maximum length allowed and how each handle trailing spaces (My SQL, n.d.). The CHAR data type is a fixed length typed and VARCHAR is a variable length data type. When the CHAR data type is used the length of strings allowed in each column definition should be from 0-225. As an example in the SQL database there is a dbo.table where tables hold a type column defined as (CHAR 12). This requires 12 characters for each value. My SQL states that values shorter than the designated length are padded spaces to that length when they are stored; and trailing spaces are removed from CHAR values when they are retrieved, so retrieved values may not be the same length as when stored (para, 2). The VARCHAR maximum numbers are up to 65-535. Any string stored in a VARCHAR column takes the number of characters required “plus one or two bites to record the strings length” (My SQL, n.d.). b. The Query gave the error: Msg 207, Level 16, State 1, Line 3 Invalid column name 'YearHired'. c. The Query returned a error on both therefore, I’m unsure. Msg 207, Level 16, State 1, Line 5 Invalid column name 'FileName'. Msg 207, Level 16, State 1, Line 4 Invalid column name......

Words: 515 - Pages: 3

Mist Mysql Queries

...Project 6 Required Queries: *  Create a query that includes at least two INNER JOINS (i.e. spans at least three tables), a search criteria, and orders the resulting data. * >select M.MID, M.MFName * >from MEMBER as M * >inner join LINEITEM as LI on LI.MID=M.MID * >inner join ITEM as I on I.IID=LI.IID * >inner join DVD as D on D.IID=I.IID; * This shows which members have checked out DVDs * Create a query that includes a calculation (e.g. average, sum, etc.). * >Select M.MID, M.MFName, count(B.IID) as “Books Checked Out” * >from MEMBER as M * >inner join LINEITEM as LI on LI.MID=M.MID * >inner join ITEM as I on I.IID=LI.IID * >inner join BOOK as B on B.IID=I.IID; * This query shows how many books a member has checked out * Create a query that includes at least one RIGHT or LEFT outer join. * >select MEMBER.MID, MEMBER.MFName, LIBRARIAN.LFName * >from MEMBER * >left outer join LINEITEM on LINEITEM.MID=MEMBER.MID * >left outer join LIBRARIAN on LINEITEM.LID=LIBRARIAN.LID * >order by MEMBER.MID; * This query uses a left join to show the relations between which librarians have checked out which members * Create a query that uses a GROUP BY to perform a calculation on information spanning at least two tables. * Create a query that includes a GROUP BY, but selects items......

Words: 289 - Pages: 2

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworklance.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Get this Tutorial Copy & Paste above URL Into Your Browser Hit Us Email for Any Inquiry at: Lancehomework@gmail.com Visit our Site for More Tutorials: ( http://homeworklance.com/ ) PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the......

Words: 1535 - Pages: 7

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworklance.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Get this Tutorial Copy & Paste above URL Into Your Browser Hit Us Email for Any Inquiry at: Lancehomework@gmail.com Visit our Site for More Tutorials: ( http://homeworklance.com/ ) PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the......

Words: 4912 - Pages: 20

Query

...CREATING QUERIES Lesson 9 Introduction The real power of an Access 2007 database is in the ability to pull data for quick analysis, which is what happens when you run a query. Queries allow you to retrieve information from one or more tables based on a set of search conditions you define. Access 2007 will display your results in their very own table that you can analyze and manipulate further. This lesson will explain how to plan a query using a three-question planning process. You will learn how to use the Query Design command to run the query, as well as how to modify the query to hide fields or other information in your query results. Finally, it will show you how to save the query for later use. Using Queries Queries retrieve information from one or more tables based on a set of search conditions that you set up and then combine that information in a way that is easy for you to analyze. If you have used an Advanced Filter in Access 2007, then you have already run a very basic query on only one table. If you want to pull data from more than one table, though, you will need to use either the Query Design command or the Query Wizard. Before using the Access 2007 query tools, it is important to plan out the query using a logical process. Otherwise, you may not get the results you expect. Planning a Query There are three questions you need to answer when you are planning a query:  What do you want the results to look like? Identify every field or bit of......

Words: 2519 - Pages: 11

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworklance.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Get this Tutorial Copy & Paste above URL Into Your Browser Hit Us Email for Any Inquiry at: Lancehomework@gmail.com Visit our Site for More Tutorials: ( http://homeworklance.com/ ) PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the......

Words: 3991 - Pages: 16

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworklance.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Get this Tutorial Copy & Paste above URL Into Your Browser Hit Us Email for Any Inquiry at: Lancehomework@gmail.com Visit our Site for More Tutorials: ( http://homeworklance.com/ ) PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the......

Words: 307 - Pages: 2

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworkyahoo.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Buy this tutorial Copy & paste above link in your Brower PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the information obtained without having the proper training or knowledge. Legal professionals, including paralegals, who commit UPL, can be......

Words: 288 - Pages: 2

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworklance.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Get this Tutorial Copy & Paste above URL Into Your Browser Hit Us Email for Any Inquiry at: Lancehomework@gmail.com Visit our Site for More Tutorials: ( http://homeworklance.com/ ) PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the......

Words: 307 - Pages: 2

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://hwguiders.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the information obtained without having the proper training or knowledge. Legal professionals, including paralegals, who commit UPL, can be penalized in various ways, depending on their professional status...

Words: 277 - Pages: 2

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://homeworklance.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query/ To Get this Tutorial Copy & Paste above URL Into Your Browser Hit Us Email for Any Inquiry at: Lancehomework@gmail.com Visit our Site for More Tutorials: ( http://homeworklance.com/ ) PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the......

Words: 307 - Pages: 2

Pa 253 Unit 8 Assignment Polly the Paralegal and the Upl Query

...PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query http://hwguiders.com/downloads/pa-253-unit-8-assignment-polly-the-paralegal-and-the-upl-query PA 253 Unit 8 Assignment Polly the Paralegal and the UPL Query Polly the Paralegal and the UPL query. Paralegals work directly under an attorney providing such services as drafting and filing documents, interacting with clients and attorneys, assisting with discovery by performing research and investigation, and aiding their attorney by preparing for trials and hearings. Paralegals can perform the same tasks as lawyers, with the exception being the ability to practice law. Paralegals may not set or negotiate fees, give legal advice or counsel, or represent a client in court. The practice of law can be defined as giving advice or counsel regarding legal rights, representing an individual in a court or similar setting, and preparing court documents. Legal advice is defined as giving counsel to an individual and then applying it to law. Unauthorized Practice of Law, in regards to giving legal advice, is a little harder to define because every situation is different. Generally speaking, however, legal advice is considered an act of UPL when the paralegal offers counsel to an individual who then acts upon the information obtained without having the proper training or knowledge. Legal professionals, including paralegals, who commit UPL, can be penalized in various ways, depending on their professional status...

Words: 277 - Pages: 2