SQL:

1. Please create a table named Customer with CustomerId(integer, automatic increment) , Name, account balance amount , and Start date columns.

2. Customer table has Name and account balance columns. Please write a query to display the name of all customers with second largest account balance.

3. There is another table called CustomerAddress with columns CustomerId and Address columns. Please display the Names of all customer who does not have any Address.

Programming:

1. Please write the steps to calculate the square root of 10 without using the square root function. Precision required up to 1 digit after decimal.

2. We have an array variable called CustomerAge with 5 items. Please write the code to display the second largest item from this array.

3. Create an object called CUSTOMER with Id, name and address and then read information for 5 customer and display those customers whose name ends on A. (C# code)

Figure 1: see image.

Modify the query to select only the products having a price greater than 100. Results should be ordered by price in descending order.

Output exactly the PRODUCT_ID, NAME and PRICE columns as in the example below.

PRODUCT_ID NAME PRICE
14 ProForm 6.0 RT 499.99
12 GreenWorks 25022 172.73
0 Kindle Fire 7 119.00
15 Weider 190 RX 100.90

Throughout the assignment, the SQL syntax to be used is the ANSI syntax. For example:

  • for inner joins use the "INNER JOIN ... ON ..." keywords and not the "USING" syntax
  • for outer joins, use the "LEFT OUTER JOIN" keywords and not the specific Oracle "a=b(*)" syntax or Sybase "a *= b" syntax
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.