You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: app/Resources/test/mytest.sql
+31-5
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
use benassociation;
2
-
show tables;
2
+
--show tables;
3
3
4
-
-- select * from cotisation;
5
-
-- update profile set method = 'Virement' where 1=1;
6
-
-- select method from profile;
4
+
-- select DATE(created) as x ,sum(price) as y from cotisation group by x order by x;
7
5
6
+
-- select cin, cause, archived from profile;
8
7
8
+
SELECT ROUND(DATEDIFF(Cast(NOW() asDate), Cast(birthday asDate)) /365, 0) as age from profile;
9
9
10
+
selectcount(*) from profile where DATEDIFF(Cast(NOW() asDate), Cast(birthday asDate)) /365 between 19and20 ;
10
11
11
12
12
13
@@ -20,6 +21,14 @@ show tables;
20
21
21
22
22
23
24
+
25
+
26
+
27
+
-- select gender , count(*) as data from profile group by gender;
28
+
29
+
-- select created from user;
30
+
31
+
23
32
-- insert into config(the_key, the_value) values('app_theme', 'theme1');
24
33
25
34
-- describe profile;
@@ -68,4 +77,21 @@ show tables;
68
77
-- HAVING DATEDIFF(max(c.date_to), CURRENT_DATE()) < 0
69
78
-- ;
70
79
-- select id from (select user_id as id, DATEDIFF(max(date_to), CURRENT_DATE()) days from cotisation group by user_id having days < 0 )A ;
71
-
-- select u.id from user u LEFT JOIN cotisation c on c.user_id = u.id group by user_id having DATEDIFF(max(c.date_to), CURRENT_DATE()) >= 0 ;
80
+
-- select u.id from user u LEFT JOIN cotisation c on c.user_id = u.id group by user_id having DATEDIFF(max(c.date_to), CURRENT_DATE()) >= 0 ;
81
+
82
+
83
+
-- select user_id as id, DATEDIFF(max(date_to), CURRENT_DATE()) days from cotisation group by user_id having days < 0 ;
84
+
-- select count(*) as id from cotisation c having DATEDIFF(max(c.date_to), CURRENT_DATE()) >= 0 ;
85
+
-- select count(*) as ids from cotisation c having DATEDIFF(max(c.date_to), CURRENT_DATE()) < 0 ;
86
+
-- select count(*) from user;
87
+
-- select count(*) from cotisation group by user_id;
88
+
89
+
-- select count(*) from user;
90
+
-- select u.id from user u LEFT JOIN cotisation c on c.user_id = u.id
91
+
-- where u.id in (select id from (select user_id id, DATEDIFF(max(date_to), CURRENT_DATE()) days from cotisation group by user_id)A where A.days < 0)
92
+
93
+
-- select * from
94
+
-- (select count(*) as yes from (select u.id from user u LEFT JOIN cotisation c on c.user_id = u.id group by user_id having DATEDIFF(max(c.date_to), CURRENT_DATE()) >= 0) A) A,
95
+
-- (select count(*) as no from (select u.id from user u LEFT JOIN cotisation c on c.user_id = u.id group by user_id having DATEDIFF(max(c.date_to), CURRENT_DATE()) < 0) A) B,
96
+
-- (select count(*) as never from user u left join cotisation c on c.user_id = u.id where c.id is NULL) C;
<p>Cet adhérent est en retard de {{ daysleft.days|abs }} jours depuis le {{ daysleft.date }}, envoyer lui une alerte par <ahref="{{ path('ben_mail_alert', { 'id': daysleft.user }) }}">mail</a>, ou imprimer la <ahref="{{ path('ben_print_alert', { 'id': daysleft.user }) }}">lettre</a> pour envoie postal
<p>Cet adhérent est en retard de {{ daysleft.days|abs }} jours depuis le {{ daysleft.date }}, envoyer lui une alerte par <ahref="{{ path('ben_mail_alert', { 'id': daysleft.user }) }}">mail</a>, ou imprimer la <ahref="{{ path('ben_print_alert', { 'id': daysleft.user }) }}">lettre</a> pour envoie postal
0 commit comments