Category variable name
vardas
Chart type
Series variable name
turtas
verte
Title
Assets abroad declared by Seimas membersen
Seimo narių turtas užsienyjelt
Text
PREFIX dct:    <http://purl.org/dc/terms/>
PREFIX epvoc:  <https://data.europarl.europa.eu/def/epvoc#>
PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
PREFIX org:    <http://www.w3.org/ns/org#>
PREFIX schema: <https://schema.org/>
PREFIX skos:   <http://www.w3.org/2004/02/skos/core#>
PREFIX time:   <http://www.w3.org/2006/time#>
PREFIX xsd:    <http://www.w3.org/2001/XMLSchema#>
PREFIX ltlod:  <http://linkeddata.lt/ns#>

# Every amount declared in an "-uzsienyje" (abroad) category in the latest reporting
# year by a sitting Seimas member (open seat interval); the long official category names
# are shortened by slug.
SELECT ?vardas ?turtas ?verte
WHERE
{
    {
        SELECT (MAX(STR(?y)) AS ?latest)
        WHERE { GRAPH ?g { ?d a ltlod:AssetDeclaration ; dct:temporal ?y } }
    }
    VALUES (?slug ?turtas)
    {
        ("butai-uzsienyje" "Butas")
        ("namai-uzsienyje" "Gyvenamasis namas")
        ("kiti-statiniai-uzsienyje" "Kiti statiniai")
        ("nebaigti-statiniai-uzsienyje" "Nebaigti statiniai")
        ("zemes-sklypai-uzsienyje" "Žemės sklypai")
        ("pinigai-uzsienyje" "Piniginės lėšos")
    }
    GRAPH ?declarationGraph
    {
        ?declaration a ltlod:AssetDeclaration ;
            dct:temporal ?year ;
            ltlod:declarant ?person ;
            ltlod:declaredValue ?amount .
        ?amount dct:type ?category ;
            schema:value ?verte .
    }
    FILTER(STR(?year) = ?latest)
    FILTER(STRENDS(STR(?category), CONCAT("/asset-categories/", ?slug, "/#this")))
    FILTER EXISTS
    {
        GRAPH ?personGraph
        {
            ?seat epvoc:memberDuringParliamentaryTerm ?term ;
                org:member ?person ;
                org:memberDuring ?interval .
            FILTER NOT EXISTS { ?interval time:hasEnd ?seatEnd }
        }
    }
    GRAPH ?nameGraph { ?person foaf:name ?vardas }
}
ORDER BY DESC(?verte)
Title
Assets abroad declared by Seimas membersen
Seimo narių užsienyje deklaruotas turtaslt
Category variable name
partija
Chart type
Series variable name
turtingiausias
vidurkis
Title
Declared net worth by partyen
Deklaruotas turtas pagal partijąlt
Text
PREFIX dct:    <http://purl.org/dc/terms/>
PREFIX org:    <http://www.w3.org/ns/org#>
PREFIX schema: <https://schema.org/>
PREFIX skos:   <http://www.w3.org/2004/02/skos/core#>
PREFIX time:   <http://www.w3.org/2006/time#>
PREFIX ltlod:  <http://linkeddata.lt/ns#>

# Sitting Seimas members (open seat interval) grouped by the party that nominated them
# this term, with the mean and the maximum net worth (as in the chart above). Grouped by
# party, not faction: a renamed faction carries all its historical names as prefLabels.
# Parties with fewer than 3 declaring members are left out — a mean of one is no mean.
SELECT ?partija (ROUND(AVG(?net)) AS ?vidurkis) (MAX(?net) AS ?turtingiausias)
WHERE
{
    {
        SELECT ?person (SUM(IF(STRENDS(STR(?category), "/pasiskolintos-lesos/#this"), -?value, ?value)) AS ?net)
        WHERE
        {
            {
                SELECT (MAX(STR(?y)) AS ?latest)
                WHERE { GRAPH ?g { ?d a ltlod:AssetDeclaration ; dct:temporal ?y } }
            }
            GRAPH ?declarationGraph
            {
                ?declaration a ltlod:AssetDeclaration ;
                    dct:temporal ?year ;
                    ltlod:declarant ?person ;
                    ltlod:declaredValue ?amount .
                ?amount dct:type ?category ;
                    schema:value ?value .
            }
            FILTER(STR(?year) = ?latest)
        }
        GROUP BY ?person
    }
    GRAPH ?personGraph
    {
        ?membership org:member ?person ;
            ltlod:nominatedBy ?party ;
            org:memberDuring ?interval .
        FILTER NOT EXISTS { ?interval time:hasEnd ?end }
    }
    GRAPH ?partyGraph { ?party skos:prefLabel ?partija }
}
GROUP BY ?partija
HAVING (COUNT(?person) >= 3)
ORDER BY DESC(?vidurkis)
Title
Net worth of Seimas members by nominating partyen
Seimo narių grynasis turtas pagal juos iškėlusią partijąlt
Category variable name
vardas
Chart type
Series variable name
grynasis_turtas
skolos
Title
Politicians with the largest declared net worthen
Didžiausią turtą deklaravę politikailt
Text
PREFIX dct:    <http://purl.org/dc/terms/>
PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
PREFIX schema: <https://schema.org/>
PREFIX ltlod:  <http://linkeddata.lt/ns#>

# Net worth = every declared amount minus borrowed funds (pasiskolintos-lesos, a liability
# per the asset-categories scheme), in the latest reporting year present. Categories
# never overlap within a year (the parent sums before 2017, the LT/abroad split since),
# so summing all amounts does not double count. Amounts are EUR from 2015 on.
SELECT ?vardas (SUM(IF(?debt, -?value, ?value)) AS ?grynasis_turtas) (SUM(IF(?debt, ?value, 0)) AS ?skolos)
WHERE
{
    {
        SELECT (MAX(STR(?y)) AS ?latest)
        WHERE { GRAPH ?g { ?d a ltlod:AssetDeclaration ; dct:temporal ?y } }
    }
    GRAPH ?declarationGraph
    {
        ?declaration a ltlod:AssetDeclaration ;
            dct:temporal ?year ;
            ltlod:declarant ?person ;
            ltlod:declaredValue ?amount .
        ?amount dct:type ?category ;
            schema:value ?value .
    }
    FILTER(STR(?year) = ?latest)
    BIND(STRENDS(STR(?category), "/pasiskolintos-lesos/#this") AS ?debt)
    GRAPH ?personGraph { ?person foaf:name ?vardas }
}
GROUP BY ?person ?vardas
ORDER BY DESC(?grynasis_turtas)
LIMIT 15
Title
Politicians with the largest declared net worthen
Didžiausią grynąjį turtą deklaravę politikailt