Premium Essay

Premiere Products Exercise for Relational Algebra

In:

Submitted By klutzyninja
Words 352
Pages 2
1. List the number and name of all sales reps.
PROJECT Rep OVER (RepNum, LastName, FirstName)
GIVING Answer

2. List all information from the Part table for part FD21.
SELECT Part WHERE PartNum = 'FD21'
GIVING Answer

3. List the order number, order date, customer number, and customer name for each order.
JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum
GIVING Temp
PROJECT Temp OVER (OrderNum, OrderDate, CustomerNum, CustomerName )
GIVING Answer

4. List the order number, order date, customer number, and customer name for each order placed by any customer represented by the sales rep whose last name is Kaiser.
JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum
GIVING Temp1
JOIN Temp1, Rep WHERE Temp1.RepNum=Rep.RepNum
GIVING Temp2
SELECT Temp2 WHERE Rep.LastName= ‘Kaiser’
GIVING Temp3
PROJECT Temp3 OVER (OrderNum, OrderDate, CustomerNum, CustomerName)
GIVING Answer

5. List the number and date of all orders that were placed on 10/20/2013 or that were placed by a customer whose rep number is 20.
SELECT Orders WHERE OrderDate= ‘10/20/2013’
GIVING Temp1
PROJECT Temp1 OVER (OrderNum, OrderDate)
GIVING Temp2
JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum
GIVING Temp3
SELECT Temp3 WHERE RepNum= ‘20’
GIVING Temp4
PROJECT Temp4 OVER (OrderNum, OrderDate)
GIVING Temp5
UNION Temp2 WITH Temp5
GIVING Answer

6. List the number and date of all orders that were placed on 10/20/2013 by a customer whose rep number is 20.
SELECT Orders WHERE OrderDate= ‘10/20/2010’
GIVING Temp1
PROJECT Temp1 OVER (OrderNum, OrderDate )
GIVING Temp2
JOIN Orders, Customer WHERE Orders.CustomerNum=Customer.CustomerNum
GIVING Temp3
SELECT Temp3 WHERE RepNum=20
GIVING Temp4
PROJECT Temp4 OVER (OrderNum, OrderDate )
GIVING Temp5
INTERSECT Temp2 WITH Temp5
GIVING Answer

7. List

Similar Documents

Premium Essay

Sql Book

...Edition Philip J. Pratt, Mary Z. Last Vice President, Publisher: Jack Calhoun Editor-in-Chief: Alex von Rosenberg Senior Acquisitions Editor: Charles McCormick, Jr. Product Manager: Kate Hennessy Development Editor: Jessica Evans Editorial Assistant: Bryn Lathrop Marketing Director: Brian Joyner Marketing Manager: Bryant Chrzan Marketing Communications Manager: Libby Shipp Marketing Coordinator: Suellen Ruttkay Content Project Manager: Matt Hutchinson Art Director: Stacy Jenkins Shirley, Marissa Falco Cover Designer: Joseph Sherman Cover Image: Getty Images/Taxi/Chris Bell Manufacturing Coordinator: Denise Powers © 2009 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright hereon may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permission questions can be emailed to permissionrequest@cengage.com ISBN-13: 978-0-324-59768-4...

Words: 48772 - Pages: 196

Premium Essay

No Paper to Upload

...REGENT UNIVERSITY COLLEGE OF ARTS & SCIENCES UNDERGRADUATE CATALOG 2013-2014 (Fall 2013-Summer 2014) Regent University 1000 Regent University Drive Virginia Beach, VA 23464-9800 800.373.5504 admissions@regent.edu www.regent.edu PREFACE Regional Accreditation Regent University is accredited by the Southern Association of Colleges and Schools Commission on Colleges to award associates, baccalaureate, masters, and doctorate degrees. Contact the Commission on Colleges at 1866 Southern Lane, Decatur, Georgia 30033-4097 or call 404-679-4500 for questions about the accreditation of Regent University. National and State Accreditation Regent University’s undergraduate school is accredited or certified by the following bodies:   Council for Higher Education Accreditation (CHEA) (www.chea.org/) The Teacher Education Accreditation Council (TEAC) The Regent University School of Education's educational leadership and teacher preparation programs and the College of Arts & Sciences interdisciplinary studies program, which are designed to prepare competent, caring, and qualified professional educators are accredited by the Teacher Education Accreditation Council for a period of seven years, from January 9, 2009 to January 9, 2016. This accreditation certifies that the educational leadership, teacher preparation and interdisciplinary studies programs have provided evidence that they adhere to TEAC's quality principles. Teacher Educational Accreditation Council, One Dupont Circle, Suite...

Words: 74326 - Pages: 298

Premium Essay

Management Information Systems

...Course Technology’s Management Information Systems Instructor and Student Resources Introduction to IS/MIS Principles of Information Systems, Eighth Edition • Stair, Reynolds Fundamentals of Information Systems, Fourth Edition • Stair, Reynolds Management Information Systems, Sixth Edition • Oz Information Technology in Theory • Aksoy, DeNardis Office Applications in Business Problem-Solving Cases in Microsoft Access & Excel, Sixth Annual Edition • Brady, Monk Succeeding in Business Applications with Microsoft Office 2007 • Bast, Gross, Akaiwa, Flynn, et.al Succeeding in Business with Microsoft Office Excel 2007 • Gross, Akaiwa, Nordquist Succeeding in Business with Microsoft Office Access 2007 • Bast, Cygman, Flynn, Tidwell Databases Database Systems, Eighth Edition • Rob, Coronel Concepts of Database Management, Sixth Edition • Pratt, Adamski Data Modeling and Database Design • Umanath, Scamell A Guide to SQL, Seventh Edition • Pratt A Guide to MySQL • Pratt, Last Guide to Oracle 10g • Morrison, Morrison, Conrad Oracle 10g Titles Oracle9i Titles Enterprise Resource Planning Concepts in Enterprise Resource Planning, Third Edition • Monk, Wagner Data Communications Data Communications and Computer Networks: A Business User’s Approach, Fourth Edition • White Systems Analysis and Design Systems Analysis and Design in a Changing World, Fifth Edition • Satzinger, Jackson, Burd Object-Oriented Analysis and Design with the Unified Process • Satzinger, Jackson, Burd Systems Analysis and...

Words: 223685 - Pages: 895

Premium Essay

Management Accounting

...2009 Elsevier Ltd. All rights reserved No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone ( 44) (0) 1865 843830; fax ( 44) (0) 1865 853333; email: permissions@elsevier.com. Alternatively visit the Science and Technology Books website at www.elsevierdirect.com/rights for further information Notice No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the Library of Congress ISBN: 978-0-08-055450-1 (Volume 3) ISBN: 978-0-08-087929-1 (Volumes 1, 2 and 3) For information on all Elsevier publications visit our website at www.elsevierdirect.com Printed and bound in Hungary 09 10 11 12 13 10 9 8 7 6 5 4 3 2 1 Contributors to Volume 3 Robert H. Chenhall Mark A. Covaleski Antonio Davila Mark W. Dirsmith David A....

Words: 187223 - Pages: 749

Free Essay

Test2

...62118 0/nm 1/n1 2/nm 3/nm 4/nm 5/nm 6/nm 7/nm 8/nm 9/nm 1990s 0th/pt 1st/p 1th/tc 2nd/p 2th/tc 3rd/p 3th/tc 4th/pt 5th/pt 6th/pt 7th/pt 8th/pt 9th/pt 0s/pt a A AA AAA Aachen/M aardvark/SM Aaren/M Aarhus/M Aarika/M Aaron/M AB aback abacus/SM abaft Abagael/M Abagail/M abalone/SM abandoner/M abandon/LGDRS abandonment/SM abase/LGDSR abasement/S abaser/M abashed/UY abashment/MS abash/SDLG abate/DSRLG abated/U abatement/MS abater/M abattoir/SM Abba/M Abbe/M abbé/S abbess/SM Abbey/M abbey/MS Abbie/M Abbi/M Abbot/M abbot/MS Abbott/M abbr abbrev abbreviated/UA abbreviates/A abbreviate/XDSNG abbreviating/A abbreviation/M Abbye/M Abby/M ABC/M Abdel/M abdicate/NGDSX abdication/M abdomen/SM abdominal/YS abduct/DGS abduction/SM abductor/SM Abdul/M ab/DY abeam Abelard/M Abel/M Abelson/M Abe/M Aberdeen/M Abernathy/M aberrant/YS aberrational aberration/SM abet/S abetted abetting abettor/SM Abeu/M abeyance/MS abeyant Abey/M abhorred abhorrence/MS abhorrent/Y abhorrer/M abhorring abhor/S abidance/MS abide/JGSR abider/M abiding/Y Abidjan/M Abie/M Abigael/M Abigail/M Abigale/M Abilene/M ability/IMES abjection/MS abjectness/SM abject/SGPDY abjuration/SM abjuratory abjurer/M abjure/ZGSRD ablate/VGNSDX ablation/M ablative/SY ablaze abler/E ables/E ablest able/U abloom ablution/MS Ab/M ABM/S abnegate/NGSDX abnegation/M Abner/M abnormality/SM abnormal/SY aboard ...

Words: 113589 - Pages: 455