subject
Engineering, 28.02.2020 22:49 sun64

Need help editing SQL queries. I just need the queries to run in SQLDeveloper without error messages. Without the ERD I'm not sure how helpful the questions listed below the queries will be.--1.SELECTt. trade_id, t.stock_id, SUM(t. price_total*con. exchange_rate)FROM trade tJOIN stock_exchange seON t. stock_ex_id = se. stock_ex_idJOIN currency cuON se. currency_id = cu. currency_idJOIN conversion conON cu. currency_id = con. from_currency_idWHERE t. stock_ex_id IS NOT NULL;--2.SELECTMAX(COUNT(t. shares)) AS "Max Count of Company Stock",c. name AS "Company Name"FROM trade tINNER JOIN company cON t. stock_id = c. stock_idGROUP BY c. name;--3.WITH HighestTradeVolume(SELECTCOUNT(t. shares) AS "Total Trades"sl. stock_symbol AS "Stock SYmbol",se. symbol AS "Stock Exchange Symbol",se. name AS "Stock Exchange"FROM stock_exchange seJOIN trade tON se. stock_ex_id = t. stock_ex_idJOIN stock_listing slON t. stock_id = sl. stock_id AND sl. stock_ex_id = t. stock_ex_idGROUP by se. name, se. symbol, sl. stock_symbolORDER BY se. name, se. symbol, sl. stock_symbol)HAVING SUM(t. shares) = (SELECT MAX(SUM(t. shares))FROM trade t);--4.SELECTsp. price AS "Current Price",c. stock_id AS "Stock ID",c. name AS "Company Name",t. shares AS "Trade Volume",MAX(t. transaction_time) AS "Recent Trade",SUM(t. transaction_time/t1.transaction_tim e) AS "% Change in Price"FROM stock_price spJOIN company cON sp. stock_id = c. stock_idINNER JOIN trade tON c. stock_id = t. stock_idWHERE stock_ex_id = 3AND t1.transaction_time < t. transaction_timeORDER BY t. shares, sp. price, c. stock_id, c. name desc; 1. Display the trade id, the stock id and the total price (in US dollars) for the secondary market trade with the highest total price. Convert all prices to US dollars.2. Display the name of the company and trade volume for the company whose stock has the largest total volume of shareholder trades worldwide. [Example calculation: A company declares 20000 shares, and issues 10000 on the new issue market (primary market), and 1000 shares is sold to a stockholder on the secondary market. Later that stockholder sells 500 shares to another stockholder (or back to the company itself). The number of shareholder trades is 2 and the total volume of shareholder trades is 1500.]3. For each stock exchange, display the symbol of the stock with the highest total trade volume. Show the stock exchange name, stock symbol and total trade volume. Sort the output by the name of the stock exchange name and stock symbol.4. List all companies on the New York Stock Exchange. Display the company name, shareholder trade volume, the current price and the percentage change for the last price change, and sort the output in descending order of shareholder trade volume.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
You know the right answer?
Need help editing SQL queries. I just need the queries to run in SQLDeveloper without error messages...
Questions
question
Mathematics, 29.08.2020 21:01
Questions on the website: 13722361