2025-01-17 11:03:00 +01:00
|
|
|
{% extends 'minifigure/base/select.sql' %}
|
|
|
|
|
2025-01-17 16:28:43 +01:00
|
|
|
{% block total_quantity %}
|
2025-01-20 19:39:12 +01:00
|
|
|
SUM("minifigures"."quantity") AS "total_quantity",
|
2025-01-17 16:28:43 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2025-01-17 11:03:00 +01:00
|
|
|
{% block where %}
|
2025-01-20 19:39:12 +01:00
|
|
|
WHERE "minifigures"."fig_num" IN (
|
2025-01-17 11:03:00 +01:00
|
|
|
SELECT
|
2025-01-20 19:39:12 +01:00
|
|
|
"inventory"."set_num"
|
|
|
|
FROM "inventory"
|
2025-01-17 11:03:00 +01:00
|
|
|
|
2025-01-20 19:39:12 +01:00
|
|
|
WHERE "inventory"."color_id" IS NOT DISTINCT FROM :color_id
|
|
|
|
AND "inventory"."element_id" IS NOT DISTINCT FROM :element_id
|
|
|
|
AND "inventory"."part_num" IS NOT DISTINCT FROM :part_num
|
2025-01-17 11:03:00 +01:00
|
|
|
|
2025-01-20 19:39:12 +01:00
|
|
|
GROUP BY "inventory"."set_num"
|
2025-01-17 11:03:00 +01:00
|
|
|
)
|
|
|
|
{% endblock %}
|
2025-01-17 16:28:43 +01:00
|
|
|
|
|
|
|
{% block group %}
|
|
|
|
GROUP BY
|
2025-01-20 19:39:12 +01:00
|
|
|
"minifigures"."fig_num"
|
2025-01-17 16:28:43 +01:00
|
|
|
{% endblock %}
|