GPX Energybank

The online Energybank

Purchase advice

[insert_php]
global $wpdb;
$user_id = get_current_user_id();

if($user_id > 0)
{
$deadline_moment = strtotime(“-3 year”, time());
$deadline_moment = date(“Y-m-d”, $deadline_moment);

$highest = $wpdb->get_row(‘SELECT MAX(consumption_d + consumption_n) AS consumption, consumption_d, id FROM saldo WHERE user_id = ‘.$user_id.’ AND consumption_d > 0 AND date > “‘.$deadline_moment.'”‘);
$highest_datum = $wpdb->get_var(‘SELECT date AS datum FROM saldo WHERE (consumption_d + consumption_n) = ‘.$highest->consumption.’ AND user_id = ‘.$user_id);
$lowest = $wpdb->get_row(‘SELECT MIN(consumption_d + consumption_n) AS consumption, id FROM saldo WHERE user_id = ‘.$user_id.’ AND consumption_d > 0 AND date > “‘.$deadline_moment .'”‘);
$lowest_datum = $wpdb->get_var(‘SELECT date AS datum FROM saldo WHERE (consumption_d + consumption_n) = ‘.$lowest->consumption.’ AND user_id = ‘.$user_id);
$sum = $wpdb->get_row(‘SELECT SUM(bought) AS bought FROM saldo WHERE user_id = ‘.$user_id.”);
$bought = $sum->bought;
if($highest->consumption == $lowest->consumption){ $consumption_in_period = 0; } else { $consumption_in_period = $highest->consumption – $lowest->consumption; }
$days_in_period = difference_in_days($lowest_datum,$highest_datum);
$verbruik_jaar = $consumption_in_period / $days_in_period * 366;
} else {
$consumption_in_period = 0;
}
[/insert_php]

Advice based on your previous consumption

Please submit your meter readings over here to give us the opportunity to provide you a personalised purchase advice. The shop advice is based on your electricity consumption.

[insert_php]
if($consumption_in_period > 0){
echo “

Based on your meter readings, you consume about “.number_format($verbruik_jaar, 2, ‘,’, ‘.’).” kWh a year. We advice you to buy guarantees of origin for at least “.number_format(ceil(($verbruik_jaar/1000)), 0, ‘,’, ‘.’).” MWh in our shop.

“;
} else {
echo “

Unfortunately, you have not submitted at least two meter readings yet. Therefore we cannot provide you a personalised purchase advice yet. Please submit your meter readings for a personalised advice. It is possible to buy guarantees of origin without submitting meter readings: buy guarantees of origins in our shop.

“;
}
[/insert_php]

Advice based on your household

If you cannot or don’t want to provide your meter readings, this advice will help you out. This purchase advice is based on the average electricity consumption of households. Please choose the household that is most similar to yours.

Household consisting of 1 person

A household consisting of only one person consumes on average 2.010 kWh electricity a year. To green your electricity consumption, you are recommended to buy 2 guarantees of origin.

Household consisting of 2 people

A household consisting of 2 people consumes on average 3.340 kWh electricity a year. To green your electricity consumption, you are recommended to buy 4 guarantees of origin.

Household consisting of 3 people

A household consisting of 3 people consumes on average 4.120 kWh electricity a year. To green your electricity consumption, you are recommended to buy 5 guarantees of origin.

Household consisting of 4 people

A household consisting of 4 people consumes on average 4.580 kWh electricity a year. To green your electricity consumption, you are recommended to buy 5 guarantees of origin.

Household consisting of 5 people

A household consisting of 5 people consumes on average 5.450 kWh electricity a year. To green your electricity consumption, you are recommended to buy 6 guarantees of origin.

Source: Nibud