Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 28th, 2005, 07:50 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sush_blr
Default plsssssssssssss help to write sql query

Plssssssssssssss help me.............

Create table Customer (
    Cust_Id number (10),
    CName varchar2 (15),
    City varchar2 (10),
    Primary key (Cust_id)
);

Create table Order (
    Order_No number (10),
    ODate date,
    Cust_Id number (10),
    Ord_Amt number (10, 2),
    Primary key Order_No
);

Create table Order_Item (
    Order_No number (10) references Order,
    Item_No number (10) references item,
    Qty number (4)
);

Create table Item (
    Item_No number (10),
    Unit_Price number (10, 2),
    Primary key (Item_Id)
);

Create table Shipment (
    Order_No number (10) references Order,
    Ship_Date date,
    Warehouse_No number (4)
);

Create table Warehouse (
    Warehouse_No number (4),
    City varchar2 (10),
    Primary key (Warehouse_Id)
);


1. Produce a listing: CustName, #of_orders, Avg_Order_Amt, where the middle column is the total numbers of orders by the customer and the last column is the average order amount for that customer.?

2. List the order# for orders that were shipped from all the warehouses that the company has in a specific city.?

----------------------------------------------------------------------

Create table Student (
    Stu_RegNo number (10),
    Stu_Name varchar2 (15),
    Stu_Major varchar2 (10),
    Stu_Bdate date,
    Primary key (Stu_RegNo)
);

Create table Course (
    Course_No number (10),
    CName varchar2 (10),
    CDept varchar2 (10),
    Primary key (Course_No)
);

Create table Enroll (
         Stu_RegNo number (10) references Student,
    Course_No number (10) references Course,
    Semester number (10),
    Marks number (5)
);

Create table Book_Adoption (
    Course_No number (10),
    Semester number (10),
    Book_ISBN number (10)
);

Create table Text (
    Book_ISBN number (10),
    Book_Title varchar2 (20),
    Publisher varchar2 (15),
    Author varchar2 (15),
    Primary key (Book_ISBN)
);

1. Demonstrate how you add a new text book to the database and make this book be adopted by some department.

2. Produce a list of text books (include Course#, Book_ISBN, Book_Title) in the alphabetical order for courses offered by the ‘CS’ department that use more than two books.

3. List any department that has all its adopted books published by a specific publisher.

----------------------------------------------------------------------

Create table Author (
    Author-Id number (10),
    Name varchar2 (15),
    City varchar2 (10),
    Country varchar2 (10),
    Primary key (Author-Id)
);

Create table Publisher (
    Publisher-Id number (10),
    Name varchar2 (10),
    City varchar2 (10),
        Country varchar2 (10),
);

Create table Catalog (
Book-Id number (10),
Title varchar2 (10),
Author-Id number (10),
Publisher-Id number (10),
Category-Id number (10),
Year number (4),
Price number (10, 2),
    Primary key (Book-Id)
);

Create table Category (
    Category-Id number (9),
    Description varchar2 (10),
    Primary key Category-Id
);

Create table Order-Details (
    Order-No number (10),
    Book-Id number (10),
    Quantity number (5)
);



1. Give the details of the authors who have 2 or more books in the catalog and the price of the books is greater than the average price of the books in the catalog and the year of publication is after 2000.

2. Find the author of the book which has maximum sales.

3. Demonstrate how you increase the price of books published by a specific publisher by 10%.

---------------------------------------------------------------------




Create table Branch (
    Branch-Name varchar2 (15);
    Branch-City varchar2 (15);
    Assets number (20, 2);
);

Create table Account (
    Account-No number (10);
    Branch-Name varchar2 (15);
    Balance number (10, 2);
);

Create table Depositor (
    Customer-Name varchar2 (20);
    Account-No number (10);
);

Create table Customer (
    Customer-Name varchar2 (20);
    Customer-Street varchar2 (20);
    Customer-City varchar2 (20);
);

Create table Loan (
    Loan-Number number (10);
    Branch-Name varchar2 (15);
    Amount number (10, 2);
);


Create table Borrower (
    Customer-Name varchar2 (20);
    Loan-Number number (10);
);


1. Find all the customers who have at least two accounts at the Main branch.

2. Find all the customers who have an account at all the branches located in a specific city.

3. Demonstrate how you delete all account tuples at every branch located in a specific city.


Can any one please help me.... THANKS IN ADVANCE..

Thanks
sush
 
Old January 28th, 2005, 09:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

this look like homework.. that's not nice.. if you have any particular problem with a sql we can help you.. but i dont think anyone will do all your homework...

HTH

Gonzalo
 
Old January 28th, 2005, 12:02 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

If someone here fixes your problem, does he then get the degree you are working for? (Seems fair...)
 
Old January 30th, 2005, 11:04 AM
Authorized User
 
Join Date: Jul 2004
Posts: 34
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to chipset Send a message via MSN to chipset Send a message via Yahoo to chipset
Default

Quote:
quote: this look like homework.. that's not nice.. if you have any particular problem with a sql we can help you.. but i dont think anyone will do all your homework...

I think this look more like a project
if you really want to get this off your head, IM me

Arowolo
 
Old February 1st, 2005, 02:15 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sush_blr
Default

guys................ s this is homework for sumone.. if u wana help ..u can ...





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use VBA to Read/Write a Access Query Gino Liu Access VBA 2 January 7th, 2012 04:03 AM
plsssssssssssss help me ahmad_diab85 C# 1 December 21st, 2006 08:58 AM
Help with using a StoredProcedure to write to SQL garryg ASP.NET 1.0 and 1.1 Basics 1 February 17th, 2006 03:42 PM
How can I write query for override a table?? davekrunal46 SQL Language 7 December 1st, 2005 01:15 AM
VB6 with Excel write using SQL query tmiller1 Excel VBA 3 March 9th, 2005 01:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.