Postgress Query SQL

Asked

Viewed 33 times

0

Hello. Provide the code and description of the group and the quantity of products associated with each of the groups. Order the result by the quantity of products of each group. I’m having trouble making that part "and the amount of products associated with each of the groups". Below is my GROUP table and my PRODUCT table.inserir a descrição da imagem aqui

The first two columns is my GROUP table. The rest is the PRODUCT table. I have the following Query:

select group.codgru, group.Description

from group, product

Where

order by

  • Could you post the SQL code to create the tables (CREATE TABLE)? If you can post an example of how you need data to be returned, it makes it much easier for those who answer your question.

  • Hey, buddy. I ran out of Internet.. But I think you do not need to see the SQL code of the two tables, because I should only create the SQL rule by presenting what you ask me in the question. I’m not getting to understand how do I present the amount of products associated with each of the groups.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.