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 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
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, 19.02.2021 03:20
question
Mathematics, 19.02.2021 03:20
question
Mathematics, 19.02.2021 03:20
question
Mathematics, 19.02.2021 03:20
Questions on the website: 13722363