sum array separated quantity for desire id in mysql [closed] - mysql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 days ago.
Improve this question
I have MySQL table structure like this
id
quantity
8,9,12,10,11,20,13
20,5,100,10,5,5,5
7,19,10,13,12
50,70,48,20,200
i want to get total sum of the quantity whose id is 13
I don't know how to do this.
i tried like this but didn't work.
what i tried
SELECT sum(quantities) FROM `invoice_purchase` WHERE item_ids in('13')

Related

How to do custom order by in mysql [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
Improve this question
i have a table with different names. i can order alphabetically, but i want to order it in different way.
For example: i want 'H' to be the first set of rows in the table, then 'D', then 'A' like that. how to pass this query in mysql?

What is the alternative of a Mysql Select query using OR operator? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
I have a query like:
SELECT * from table where column1=5 or column2=8
I need an alternative query to the above query. How is that possible?
I cannot guess the exact answer.

Order by integer keep null in middle of positive and negative value mysql [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have value in a column of table like-
3,2,null,4,-1,-4,-2.
I want result like
4,3,2,null,-1,-2,-4.
You want NULL treated as a zero:
order by coalesce(column, 0) desc

To Display Duplicate Records Only...in only one column which having so duplicate values? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
A table having duplicate record columns... I need to just show how many duplicate values present in that particular column...not unique values...Only Duplicate values should be displayed?
Do a count with groupby, and then filter the ones that have duplicates with having your_count_column > 1

"I want to compare the dates of second month" display all the dates of February(02) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I want to compare the dates of 2nd month.
Display only dates that are in second month
by using sql query
hope this will help you:
SELECT BirthDate FROM Employees where EXTRACT(MONTH FROM BirthDate)=2;