5
Hi. I’d like a hand here.
I need to get the records:
Mysql bank
1) last month 2) last quarter 3) Current year
SELECT id, data, lote, modelo, qtd FROM controle_diario WHERE modelo like ?
The table is very simple: id is auto-increment, batch is varchar, model is varchar and Qtd is int. Example:
id - data - modelo - qtd
1 - 2017-04-20 - 10001 - 100
2 - 2017-04-22 - 10002 - 10
3 - 2017-05-10 - 100010 - 30
4 - 2017-05-15 - 100020 - 60
5 - 2017-05-16 - 100060 - 70
6 - 2017-05-20 - 100010 - 100
Thank you
Which bank is using ?
– Rovann Linhalis
Which database are you using? You could edit your question by displaying some example table data or use something similar to http:/sqlfiddle.com/?
– Camilo Santos
Okay. Edited Question!
– rafB
From what I saw the field date is not of the type date or datetime, right?
– Roberto de Campos
I didn’t notice it there. But yes, the capo data is DATE. I transform into Java to go to the bank.
– rafB