subject

SQL Query Display the trade id stock i and total price for the secondary market trade with the highest total price. Convert prices to U. S dollars
select tr. trade_id, tr. stock_id, round(tr. price_total * con. exchange_rate,2) as "US Dollars"
from stock_exchange se
join trade tr
on se. STOCK_EX_ID = tr. STOCK_EX_ID
join currency curr
on curr. CURRENCY_ID = se. currency_id
join conversion con
on con. from_CURRENCY_ID = curr. CURRENCY_ID
Where (tr. PRICE_TOTAL) = (Select Max(price_total) from trade) and curr. name = 'Dollar'
group by tr. trade_id, tr. stock_id, round(tr. price_total);
tried but i keep getting errors about it not being a group by function

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:30, kikilax
What is linux? an open source operating system a version of ms dos the first version of unix the newest technology available
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, silvijaaa
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
image
Computers and Technology, 23.06.2019 01:00, lusciousl
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan. in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan. out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
image
Computers and Technology, 23.06.2019 21:40, jeovontamarley
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
You know the right answer?
SQL Query Display the trade id stock i and total price for the secondary market trade with the high...

Questions in other subjects:

Konu
Mathematics, 21.04.2020 03:08