Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.32 KB | None | 0 0
  1. SELECT country, CAST(avg(bore*bore*bore/2) AS NUMERIC(30, 2)) AS weight
  2. FROM (
  3.    SELECT country, bore
  4.    FROM Classes cl, Ships ship
  5.    WHERE cl.class = ship.class
  6.  
  7.  
  8.    UNION
  9.  
  10.    SELECT country, bore
  11.    FROM Classes, Outcomes
  12.    WHERE ship = class AND ship NOT IN (SELECT name FROM Ships)
  13. ) Lol
  14. GROUP BY country
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement