Posts by Daniel R • 146 points
2 posts
- 
		3 votes2 answers49 viewsA: Convert days to years using R lubridateUse the function time_length with argument unit="year" and interval(inicio, fim) in place of subtraction. Ref: https://www.rdocumentation.org/packages/lubridate/versions/1.7.9/topics/time_length… 
- 
		0 votes2 answers521 viewsA: Check duplicate items and update a column in all but oneI think a GROUP BY would work, something like: UPDATE tabela SET importado = 1 WHERE sku <> FIRST(sku) GROUP BY nome Only test with a SELECT first to see if you’re selecting the right records…