-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ajout du genre et du statut brsa dans la table sorties #405
Conversation
8a0e4e5
to
620ed92
Compare
@@ -29,10 +29,22 @@ select distinct | |||
to_date(ctr.contrat_date_sortie_definitive, 'DD/MM/YYYY') | |||
) || '-01-01')) as debut_annee_fin_contrat, | |||
/* 0.0328767 = the value to convert days to months */ | |||
(rcrt.date_sortie_definitive::DATE - rcrt.date_recrutement::DATE) * (0.0328767) as duree_en_mois | |||
(rcrt.date_sortie_definitive::DATE - rcrt.date_recrutement::DATE) * (0.0328767) as duree_en_mois, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/!\ MAGIC NUMBER ALERT /!
Si la valeur est reprise d'ailleurs afin que les chiffres collent alors ça serais bien de le mettre en commentaire pour éviter que quelqu'un passe et la change pour quelque chose de "mieux".
L'utilisation d'un float peux entraîner des erreurs de calcul, l'utilisation d'un decimal serait sans doute plus appropriée pour ne pas perdre en précision.
Vu que ça semble être du calendaire, peut-être que la fonction age()
serait plus pertinente pour avoir le nombre de mois entre les deux dates 🤷.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je me mets une carte pour corriger ça la semaine prochaine. Il me semble que j'avais testé avec age() à l'époque mais c'est tellement vieux que j'en ai plus aucune idée
Et pour le chiffre c'est juste qu'un jour = 0.0328767 mois !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sauf les années bissextiles :P, mais donc pour ma culture vous considérez qu'1 an fait toujours 365 jours tout le temps ? Ou ça peux dépendre ?
Je demande car on a ces même gens de considération dans les emplois donc si tout le monde faite pareil c'est tant mieux :D.
when ctr.contrat_salarie_rsa = 'OUI-M' then 'OUI' | ||
when ctr.contrat_salarie_rsa = 'OUI-NM' then 'OUI' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas testé, mais ça marcherais pas ça ?
when ctr.contrat_salarie_rsa = 'OUI-M' then 'OUI' | |
when ctr.contrat_salarie_rsa = 'OUI-NM' then 'OUI' | |
when ctr.contrat_salarie_rsa in ('OUI-M', 'OUI-NM') then 'OUI' |
Ou éventuellement
when ctr.contrat_salarie_rsa = 'OUI-M' then 'OUI' | |
when ctr.contrat_salarie_rsa = 'OUI-NM' then 'OUI' | |
when ctr.contrat_salarie_rsa ^@ 'OUI-' then 'OUI' -- ^@ == starts_with() |
620ed92
to
2ec71ee
Compare
**Carte Notion : **
Pourquoi ?
Ajout du genre et du statut brsa dans la table sorties
Checks