mysql: display data shiftwise I have this example table:

Table1

+-------+----------------+-----------+------------+
| tkno  |      dete      |   shyft   |   Name     |
+-------+----------------+-----------+------------+
| 1251  |     13-04-2018 |    Shift1 |         Foo|
| 1252  |     13-04-2018 |    Shift1 |         Foo|
| 1253  |     14-04-2018 |    Shift2 |         Bar|
| 1254  |     14-04-2018 |    Shift2 |         Bar|
| 1255  |     15-04-2018 |    Shift3 |         Bar|
| 1256  |     15-04-2018 |    Shift3 |         Joe|
| 1257  |     15-04-2018 |    Shift3 |         Joe|
+-------+----------------+-----------+------------+
3 rows in set (0.09 sec)


When I use this query,

SELECT shyft, 
(SELECT COUNT(tkno) FROM Table1 WHERE dete = DATE(now())) AS 'Todays Tickets',
(SELECT COUNT(tkno) FROM Table1 WHERE dete = DATE_SUB(DATE(now()), INTERVAL 1 DAY)) AS '1 Day Ago',
(SELECT COUNT(tkno) FROM Table1 WHERE dete = DATE_SUB(DATE(now()), INTERVAL 2 DAY)) AS '2 Days Ago'
FROM Table1
GROUP BY shyft;


I get results like this:

+-------+----------------+-----------+------------+
| shyft | Todays Tickets | 1 Day Ago | 2 Days Ago |
+-------+----------------+-----------+------------+
|Shift1 |             13 |        33 |         34 |
|Shift2 |             13 |        33 |         34 |
|Shift3 |             13 |        33 |         34 |
+-------+----------------+-----------+------------+
3 rows in set (0.09 sec)


I want to display the number of tickets in each shift for current day and last 2 days. For the above query, it is showing the same count on row 2 and 3. Please help me with where am I going wrong. Thanks!
The subqueries in your query are al counting all rows of the table. They should probably only be counting for the "shyft" from the main table; something like: 

SELECT shyft, 
(SELECT COUNT(tkno) FROM Table1 WHERE shyft=x.shyft AND dete = DATE(now())) AS 'Todays Tickets',
(SELECT COUNT(tkno) FROM Table1 WHERE shyft=x.shyft AND dete = DATE_SUB(DATE(now()), INTERVAL 1 DAY)) AS '1 Day Ago',
(SELECT COUNT(tkno) FROM Table1 WHERE shyft=x.shyft AND dete = DATE_SUB(DATE(now()), INTERVAL 2 DAY)) AS '2 Days Ago'
FROM Table1 x
GROUP BY shyft;