Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-2 votes
1 answer
24 views

Extracting data from two tables

I have( for example) a table called A and a table called B. Table A contains tons of user data( age, country bla bla) and is connected to B by forein_key=id( B only has ID/NAME. I want to find out how ...
Gal Mor's user avatar
1 vote
2 answers
616 views

How to get sum of 3 sub count queries and group them using an attribute

I have 3 queries as follows: For the date 2019-12-02, I am calculating 3 type of values. The total value for 2019-12-02 must be the sum of these 3 queries. Q1 SELECT count(*) FROM ...
sadeee nadeee's user avatar
1 vote
1 answer
4k views

Sub Query with group by returns more than 1 row Issue

I am facing the issue of subquery returns more than 1 row cause I am using group by in the subquery and outer query both to get the desired result. This is my query SELECT Count(*) ...
Wajid Hussain's user avatar
2 votes
1 answer
3k views

Calculate quantity of tickets based on how many reserved using sub queries

I'm designing a database that will hold ticketing information. The 3 tables I use to track ticketing are tbl_ticket_type to the types of events an event can have tbl_ticket_count to keep track of ...
Manny265's user avatar
  • 325
0 votes
1 answer
54 views

Mysql query to get count result and group by

I've got three tables with different records for users, User username | realname | date evn-az-3ju john 11/2012 03:09:40 p.m. jwyvm_rdyt steve 12/2012 ...
user3588408's user avatar
2 votes
2 answers
36k views

Multiple COUNT fields, GROUP BY

I'm trying to group two columns in my MySQL database and show counts for them respectively (as separate columns). Is there a way of doing this or do I have to join two sub-queries? I'm aware of WITH ...
Fredrik Erlandsson's user avatar