MySQL Forums
Forum List  »  Spanish

Re: Obtener resultados de un dia en especifico de la semana de un periodo
Posted by: Jesús Uzcanga
Date: July 15, 2014 01:58PM

Monttanna

Hice un ejemplo con mi tabla DPDOCCLI, espero que te sirva de guía.

NOTA: Lunes es el día 2 para Mysql

SELECT MONTH(DOC_FECHA),DAYOFWEEK(DOC_FECHA),ROUND(SUM(DOC_NETO),2) AS NETO FROM DPDOCCLI
WHERE YEAR(DOC_FECHA)='2014' AND (MONTH(DOC_FECHA)='1' OR MONTH(DOC_FECHA)='2' OR MONTH(DOC_FECHA)='3') AND DAYOFWEEK(DOC_FECHA)=2
GROUP BY YEAR(DOC_FECHA)='2014',MONTH(DOC_FECHA),DAYOFWEEK(DOC_FECHA)

___________________________
Ing. Jesús Alfredo Uzcanga
Twitter: @JesusUzcanga

We learn the 20% of what we HEAR,
the 50% of what we SEE,
the 80% of what we DO and
the 95% of what we TEACH.

____________________________________________________________
https://www.linkedin.com/in/jauzcanga/

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Obtener resultados de un dia en especifico de la semana de un periodo
969
July 15, 2014 01:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.