Click here to Skip to main content
15,884,975 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Field name. | Data type.

___________. _________
Mobile_id. Integer.Primarykey
Mobile_name. Varchar (10)
Mobile_company date
Mobile_price integer
The doubt is how to select total price of the mobiles whose company name is nokia

What I have tried:

Mysql doubt I've no idea of solving this
Posted
Updated 26-Apr-22 8:43am

Quote:
The doubt is how to select total price of the mobiles whose company name is nokia


Use WHERE clause[^]!
SQL
SELECT ... SUM()
FROM TableName
WHERE `Mobile_name` = 'Nokia'
GROUP BY ...


BTW: I'd strongly suggest to read this: MySQL :: MySQL 8.0 Reference Manual :: 9.2.3 Identifier Case Sensitivity[^]
 
Share this answer
 
Comments
coderlearner 26-Apr-22 20:18pm    
Field name. Data type constraints
Book_id. Integer. Pk,foreignke
Student_id. Integer pk,FK
Issue_id. Date
How to create this table using foreign key
Try the SUM function: SQL COUNT(), AVG() and SUM() Functions[^].
 
Share this answer
 
Comments
coderlearner 26-Apr-22 12:25pm    
Is it something like select sum(distinct..........) I don't know exactly but..
Richard MacCutchan 26-Apr-22 12:41pm    
Follow the link above, it shows you example usage.
Maciej Los 26-Apr-22 14:34pm    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900