SQL Basics: Learn SQL the easy way by Fabian Gaussling

SQL Basics: Learn SQL the easy way by Fabian Gaussling

Author:Fabian Gaussling
Language: eng
Format: azw3, epub, pdf
Published: 2017-06-21T07:00:00+00:00


Next, the superordinate query takes these 5 values and calculates their average.

You can therefore use queries in the place of tables. You can also assign an alias to queries and join them with other queries or tables. Here is an example: We need a list of all products and their total sales. This should then be used to calculate the respective product group sales and then determine the sales share of each product in the respective product group.

SELECT products.*,

prod_group.SALES_PG,

round(products. SALES/prod_group.SALES_PG*100,1) AS SHARE



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.