subject

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 Computers and Technology

question
Computers and Technology, 22.06.2019 03:10
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately. next, the program determines and prints the prime factorization of the product, listing the factors in increasing order. if a prime number is not a factor of the product, then it must not appear in the factorization. sample runs are given below. note that if the power of a prime is 1, then that 1 must appear in t
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
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, 02.02.2021 03:30
question
Mathematics, 02.02.2021 03:30
question
Spanish, 02.02.2021 03:30
Questions on the website: 13722360