0

**Hello everyone, I am totally newbie to the IT community. Right now I am just in a lerning phase, so right now I am learning SQL. Now i am facing an issue with DBMS. I am using two DBMS to learn SQL one is Mysql and another is pgadmin4. **

So, my problem is when I am using this below syntax on mysql i am not getting proper answer but when I am using this syntax in pgadmin4, I am getting correct answer. [enter image description here](https://i.stack.imgur.com/0YREU.jpg)

i uploaded the images, so rquest the community please help me regarding this.

select "productID", sum(quantity) as quantity_sold 
from sale 
group by "Product_ID"
order by quantity_sold desc;

I tried this syntax and getting the same thing everytime. Now I am not getting my solution

select "productID", sum(quantity) as quantity_sold 
from sale 
group by "Product_ID"
order by quantity_sold desc;
Ergest Basha
  • 7,870
  • 4
  • 8
  • 28
  • 1
    The queries aren't the same . On MySQL you are using `group by Product_ID`. You should enable sql_mode only_full_group_by on MySQL server and see what happens. And by the way pgadmin4 isn't a dbms but it is *a management tool for Postgres*. – Ergest Basha Nov 18 '22 at 02:21
  • Does this answer your question? [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) – P.Salmon Nov 18 '22 at 08:09

0 Answers0