Quantcast
Channel: is there a way to query same db field with two different where clause in the same query? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Ashish M J for is there a way to query same db field with two...

You can achieve that using case when statement. For example -SELECT SUM(CASE WHEN `TIME` BETWEEN "13:00:00" AND "14:00:00" THEN `SALES`) AS HOURLY_SALES,SUM(CASE WHEN `TIME` BETWEEN "00:00:00" AND...

View Article



is there a way to query same db field with two different where clause in the...

I have a condition that I need to query Couchbase database field with two different where clauses in the same query.for example:for 'sales' field in a database entity, I want to have one query to get...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images