Write an sql select statement that would re-organize

Assignment Help PL-SQL Programming
Reference no: EM131152866

Section 1: Logic and Algorithms

Question 1:
Given an alphabetically sorted list of 500,000 people's names and telephone numbers, describe an algorithm that you could implement that would allow you to find a given person's telephone number in the shortest amount of time.

Question 2.
Given a list containing Province, CustomerName and SalesValue (sorted by Province and CustomerName), describe an algorithm you could use that would output each CustomerName and SalesValue with the total SalesValue per Province.

Question 3
You have been given a large list of people's names and have been asked to highlight all duplicates where the exact same name appears more than once, as well as highlight any possible duplicates where there may be misspellings of the same name. Describe an algorithm you could use that would produce the required output.

Question 4.
You are required to use a single integer value to store multiple values. Describe how you would achieve this.

Section 2: Programming

Question 1:
Given the table from Fig.1, write an SQL Select statement that would re-organize the results to look like Fig.2

Region

Contact

Cape Town

Fred

Cape Town

Joe

Cape Town

Anna

Durban

John

Durban

Mary

Johannesburg

Frank

Region

Contact

Durban

John

Durban

Mary

Johannesburg

Frank

Cape Town

Anna

Cape Town

Fred

Cape Town

Joe

Fig 2

Question 2:
Write a program in the language of your choice to input a sentence from the user and then output the sentence in reverse. For example, if the user types in "The Rain in Spain", then the output should be "Spain in Rain The".

Question 3:
If we list all the natural (integer) numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Write a program in the language of your choice to calculate the sum of all the multiples of 3 or 5 below 1000. Include the source code and the calculated value in your answer.

Question 4:

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.

Write a program in the language of your choice to output the 10001st prime number. Include the source code and the value in your answer.

Question 5:

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89,...

Write a program in the language of your choice to consider the terms in the Fibonacci sequence whose values do not exceed four million and find the sum of the even-valued terms. Include the source code and the calculated value in your answer.

Section 3: Database

This section evaluates your technical capabilities and allows us to determine your knowledge of the tools as well as your style.

Please use the below to tables for answering the questions in this section.

Table Name : Employee

ID Name Surname   Position
1 Scrooge McDuck Manager
2 Dairy Duck Manager
3 Donald Duck Support
4 Minny Mouse Support
5 Micky Mouse support
6 Goffy
Support
7 Pluto
Support
8 Huey Duck Support
9 Dewey Duck Support

Table Name: StaffLink

EmplID ManID
3 1
7 1
6 2
4 2
2 1
1 2
5 2

Question 1:

List which fields are primary keys and foreign keys?

Question 2:

Write a SQL statement that will Output the following result:

Question 3:
Write a SQL statement that will Output the following result:

Question 4

Write a SQL statement that will Output the following result:

Question 5:
Write a SQL statement that will Output the following result:

Section 4: Problem Solving Style

Question 1.

Why are computer monitors and TV sets rectangular?

Question 2.

You have written a program that takes several hours to run. The program sometimes fails, but usually only after a few hours of running and only when running on the production server. What steps would you take to identify the problem?

Question 3:
You have designed a system that accesses and updates a database. When you first install the
database and system at the customer, the system runs with good performance. However 3 months later, the Customer phones and says that it is taking a long time to search for information from the database. What would you do to diagnose and correct this problem?
nimmtion

Question 4:

You are working on a project for a very important customer and are at least three weeks from being able to complete the project. Suddenly your customer informs you that due to circumstances beyond their control the system must be implemented in one week. What would you do?

Question 5:

A drawer contains 10 black and 10 brown socks that are all mixed up. What is the fewest number of socks you can take from the drawer without looking and be sure to get 2 of the same colour.

Attachment:- standard test.pdf

Reference no: EM131152866

Questions Cloud

Discuss the rationale of managerial economics : Discuss the rationale of managerial economics
Increase in the student activity fee : Problem: A large university campus has 60,000 students. The president of the students' association wants to conduct a survey of the students to determine their views on an increase in the student activity fee.
Determine the maximum in-plane shear stress developed at a : The post has a square cross-sectional area. If it is fixed supported at its base and a horizontal force is applied at its end as shown
Find the margin of error : Find the margin of error at a 95% confidence level. Give answer to two decimal points.
Write an sql select statement that would re-organize : Describe an algorithm you could use that would produce the required output - Write an SQL Select statement that would re-organize the results
Create two structured analysis and design technique diagrams : Create two Structured Analysis and Design Technique (SADT) diagrams to document the activities and data involved in the transactions stated above using Visio or an equivalent such as Dia.
Discuss the ethical issues presented in this scenario : Compare the ethical issues presented in this scenario to the APA's ethical standards and describe the similarities or differences in the ethical codes using the following website: http://www.apa.org/ethics/code/index.aspx.
What is chance of experiencing an earthquake in our lifetime : What is the chance of experiencing an earthquake in our lifetime (or in the lifetime of someone born today)? Express this as a probability
Propose solutions for working with other personality types : Propose solutions for working with other personality types using the information from the Big Five assessment and the underlying principles of trait theories. Describe how your results from the assessment compare to the 16 personality factors. Ex..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd