Question

In: Computer Science

QUESTION 38 The ITEM table contains these columns: COST NUBMER(7,2) RETAIL NUMBER(7,2) The RETAIL and COST...

QUESTION 38

  1. The ITEM table contains these columns:
    COST NUBMER(7,2)
    RETAIL NUMBER(7,2)
    The RETAIL and COST columns must have a value that is greater than zero.
    Evaluate these two SQL Statements:
    1. SELECT retail – cost * 1.25 * .10
    FROM item;
    2. SELECT (retail – (cost *1.25 )*.10)
    FROM item;
    What will be the results?

    Statement 1 will return a low value than statement 2.

    Statement 1 and statement 2 will return the same values.

    Statement 1 will return a higher value than statement 2.

    Only one of the statements will execute.

2.5 points   

QUESTION 39

  1. Using a second SELECT query in the same overall query is a

    subquery

    join query

    cross join

    aggregate function

2.5 points   

QUESTION 40

  1. select SAL from EMP where SAL between 1000 and 10000; results in (table rows are 1 to 10099)

    rows 1001 to 9999 returned

    rows 1 to 10001 returned

    rows 1001 to 10000 returned

    rows 1000 to 10000 returned

Solutions

Expert Solution

38) Given two queries :

1. SELECT retail – cost * 1.25 * .10
FROM item;
2. SELECT (retail – (cost *1.25 )*.10)
FROM item;

The output will be the same as the operation is multiplication only. If any other arithmetic operator is used then comes the picture of precedence.

So, Statement 1 and Statement 2 will return the same values .

So, Option 2 is correct.

39) Given : Using a second SELECT query in the same overall query is a

The answer is sub query as we go with elimination process, join query does not use select query instead uses a join command to club the tables accordingly. Cross join is one of the types of joins . Aggregate function uses min,max,sum,avg,count . so we can conclude the answer as sub query.

syntax :

SELECT column-name FROM table-name1 WHERE value IN (SELECT column-name FROM table-name WHERE condition)

So, Option 1 is correct.

40)Given : select SAL from EMP where SAL between 1000 and 10000; results in (table rows are 1 to 10099)

It returns the employees whose salary in 1000 and 10000 inclusive which means if the employee has the sal of 1000 and 10000 will be shown in the result.

So, Option 4 is correct.


Related Solutions

Complete each of the columns on the table below, indicating in which section each item would...
Complete each of the columns on the table below, indicating in which section each item would be reported on the statement of cash flows (operating, investing, or financing), the amount that would be reported, and whether the item would create an increase or decrease in cash. For item that affect more than one section of the statement, indicate all affected. Assume the indirect method of reporting cash flows from operating activities. The first item has been completed as an example....
1 – Create a webpage that contains a table with exactly three rows and two columns....
1 – Create a webpage that contains a table with exactly three rows and two columns. The first row will contain a table heading containing the name of a US National Park, that spans across all columns. Hint: use the colspan attribute inside the opening th tag Give the table heading an onmouseover that will change the text of the heading when it is moused over to read My Favorites Park! (Hint: use innerHTML). Use onmouseout to change it back....
1 – Create a webpage that contains a table with exactly three rows and two columns....
1 – Create a webpage that contains a table with exactly three rows and two columns. The first row will contain a table heading containing the name of a US National Park, that spans across all columns. Hint: use the colspan attribute inside the opening th tag Give the table heading an onmouseover that will change the text of the heading when it is moused over to read My Favorites Park! (Hint: use innerHTML). Use onmouseout to change it back....
Assume that A and B are MATLAB arrays with 10 rows and an equal number of columns (the number of columns is not given).
Assume that A and B are MATLAB arrays with 10 rows and an equal number of columns (the number of columns is not given). Important: Next, the expression "a single line of code" implies a single command or equality. In other words, the code: X=A+1; X=X+B; is considered to be TWO lines of code, even though it can be written as one line. (a) (3%) Write a single line of code which saves the first two rows of array A...
Given the following information, compute the missing columns in the life table: Age (x) Number Alive...
Given the following information, compute the missing columns in the life table: Age (x) Number Alive bx lx sx mx 0 452 0 1 322 2 2 111 3 3 64 1 4 25 1 5 0 0 After completing the table, compute the number of individuals in each age class for the next two generations. PreviousNext
The accompanying table gives the number of a popular household item sold by a store over...
The accompanying table gives the number of a popular household item sold by a store over 30 consecutive days 28 32 46 33 39 40 47 53 56 40 44 21 38 62 57 48 36 22 53 34 24 29 32 38 18 37 46 36 37 45 1. Construct a group frequency distribution of the above data comprising 6 classes of equal width. Let 15 be the lower limit of the initial class 2. Use the grouped data...
/*Question 3: The following data contains five columns (variables) and five rows (observations). First, read the...
/*Question 3: The following data contains five columns (variables) and five rows (observations). First, read the data into SAS to create a data set. Notice that the first, third, and the fifth variable have missing values. Please replace the missing values of the first, third, and fifth variable with 30, 40, and 50, respectively. Next, for all the variables, if a value is at least 100, make an adjustment to the value such that its new value is equal to...
The following table contains the number of successes and failures for three categories of a variable....
The following table contains the number of successes and failures for three categories of a variable. Test whether the proportions are equal for each category at the α=0.1 level of significance. Category 1 Category 2 Category 3 Failures 70 76 52 Successes 58 52 71 State the hypotheses. Choose the correct answer below. A. H0​: The categories of the variable and success and failure are dependent. H1​: The categories of the variable and success and failure are independent. B. H0​:...
1, The following table contains the number of successes and failures for three categories of a...
1, The following table contains the number of successes and failures for three categories of a variable. Test whether the proportions are equal for each category at the α=0.01 level of significance. _ Category_1   Category_2   Category_3 Failures 69 31 33 Successes 81 32 77 What is the​ P-value? ​(Round to three decimal places as​ needed.) What conclusion can be​ made? A.The​ P-value is greater than or equal to α​, so reject H0. There is sufficient evidence that the categories of...
Refer to columns 1 and 6 in the table. Incorporate government into the table by assuming...
Refer to columns 1 and 6 in the table. Incorporate government into the table by assuming that it plans to tax and spend $20 billion at each possible level of GDP. Also assume that the tax is a personal tax and that government spending does not induce a shift in the private aggregate expenditures schedule. What is the change in equilibrium GDP caused by the addition of government? (6) Aggregates, Private Open Economy, Billions (5) Net Exports, Billions (4) Imports,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT