Skip to content

Instantly share code, notes, and snippets.

@mvnp
Created July 4, 2017 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvnp/dd01160248ed63d00b6fb23419244d61 to your computer and use it in GitHub Desktop.
Save mvnp/dd01160248ed63d00b6fb23419244d61 to your computer and use it in GitHub Desktop.
SELECT DISTINCT * from (agenda join TIPOAGENDA ON TIPOAGENDA.tipoagenda_id=AGENDA.tipoagenda)
where year(agenda_data)= year(now())
and ADDDATE(agenda_data, INTERVAL 1 MONTH)=ADDDATE(now(), INTERVAL 1 MONTH)
order by agenda_data ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment