BrickTracker/bricktracker/sql/part/select/specific.sql
2025-01-17 11:03:00 +01:00

25 lines
601 B
SQL

{% extends 'part/base/select.sql' %}
{% block join %}
LEFT JOIN missing
ON inventory.set_num IS NOT DISTINCT FROM missing.set_num
AND inventory.id IS NOT DISTINCT FROM missing.id
AND inventory.u_id IS NOT DISTINCT FROM missing.u_id
{% endblock %}
{% block where %}
WHERE inventory.u_id IS NOT DISTINCT FROM :u_id
AND inventory.set_num IS NOT DISTINCT FROM :set_num
AND inventory.id IS NOT DISTINCT FROM :id
{% endblock %}
{% block group %}
GROUP BY
inventory.set_num,
inventory.id,
inventory.part_num,
inventory.color_id,
inventory.element_id,
inventory.u_id
{% endblock %}