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, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
If a particle moves along a path such that r : (3 sin t) m and ? : 2t rad, where t is in seconds. what is the particle's acceleration in m/s in 4 seconds? a)- 16.43 b)- 16.29 c)- 15.21 d)- 13.79
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
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
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, 05.10.2020 15:01
Questions on the website: 13722363