Auswertung/Anzahl von Gutscheine

Submitted by Rainer on Do, 12/29/2016 - 18:18

Gutscheine 2017:
SELECT count( * ) FROM content_type_gutscheine WHERE field_gltig_bis_value LIKE '%.2017'

SELECT count( * ) FROM content_type_gutscheine WHERE field_gltig_bis_value = '31.12.2017'

 

SELECT title, field_gutscheinwert_value, field_affiliate_programm_value, field_gltig_bis_value
FROM `content_type_gutscheine`
LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid
WHERE field_gltig_bis_value = '17.01.2017'
AND TYPE = 'gutscheine'
AND status = 1
ORDER BY title
LIMIT 0 , 300

Falsches Jahr
SELECT title, field_gutscheinwert_value, field_affiliate_programm_value, field_gltig_bis_value
FROM `content_type_gutscheine`
LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid
WHERE field_gltig_bis_value LIKE '%.2017'
AND TYPE = 'gutscheine'
AND STATUS =1
ORDER BY title
LIMIT 0 , 300

SELECT title, wert, dst, field_affiliate_programm_value, field_gltig_bis_value FROM `node` , `content_type_gutscheine` , `url_alias` WHERE field_gltig_bis_value = '31.08.2017' AND TYPE = 'gutscheine' LIMIT 0 , 200

Newsletter:
SELECT title, field_gutscheinwert_value, field_affiliate_programm_value, field_gltig_bis_value FROM `content_type_gutscheine` LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid WHERE field_gltig_bis_value = '17.01.2017' AND field_newsletter_value = 'Newsletter' AND TYPE = 'gutscheine' AND status = 1 ORDER BY `node`.`title` ASC

Versandkosten:

SELECT title, field_gutscheinwert_value, field_affiliate_programm_value, field_gltig_bis_value FROM `content_type_gutscheine` LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid WHERE field_gltig_bis_value = '17.01.2017' AND field_versand_value = 'Versandkosten' AND TYPE = 'gutscheine' AND status = 1 ORDER BY `node`.`title` ASC

Neukunde:
SELECT title, field_gutscheinwert_value, field_gutscheincode_value, field_affiliate_programm_value, field_gltig_bis_value
FROM `content_type_gutscheine`
LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid
WHERE field_gltig_bis_value = '17.01.2017'
AND field_neukunde_value = 'Neukunde'
AND TYPE = 'gutscheine'
ORDER BY title
LIMIT 0 , 30