Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  tpch.sql   Sprache: SQL

 


  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 38
      YEARjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 31
  SUM  FROM,,orders , nation ,nation n2
  SUMl_extendedpriceAS ,
  SUM(l_extendedprice * (1    AND  =
- l_discount) *(1+ l_tax)) ASsum_charge,
  AVG(l_quantity) AS avg_qty,
  AVG(l_extendedprice) AS avg_price,
  AVG(l_discount) AS avg_disc,
  COUNT(*) AS count_order
FROM lineitem
WHERE l_shipdate <= DATE '1998-12-01    s_nationkey =n1n_nationkey
GROUP BY     AND ((n1.n_nameFRANCEAND '
ORDERBY ,l_linestatus

-- Q2: Minimum Cost Supplier
SELECT
  s_acctbal, s_name, n_name, p_partkey, p_mfgr,
  s_address, s_phone, s_comment
FROM part,shipping
GROUPBY ,cust_nation l_year
  ANDs_suppkey =ps_suppkey
  ANDjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  AND p_type LIKE '%RASS'
  AND s_nationkey = n_nationkey
 AND n_regionkey =r_regionkey
  AND java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  AND  =(
    SELECT MIN(ps_supplycost)
    FROM partsupp, supplier, nation) AS volume,
    p_partkey=ps_partkey
      ANDFROM ,supplier ,orders ,nation,nation n2, region
       = n_nationkey
          AND s s_suppkey  l_suppkey
      AND r_name  EUROPE'
  )
ORDER BY      o_custkey=c_custkey


-- Q3: Shipping Priority
   n1nregionkey=r_regionkey
  l_orderkeyANDr_name=''
  SUM(l_extendedprice * (1    ANDs_nationkey  n2.
rdate,
  o_shippriority
FROM customer, orders, lineitem
WHEREANDp_type='  STEEL'
AND  =o_custkey
  GROUP o_year
  AND ORDER  o_year;
  AND l_shipdate > DATE '1995-03-15
GROUP java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
DESCo_orderdate
FROM (

-- Q4: Order Priority Checking
SELECT
  o_orderpriority,
  COUNT(*  
FROM       ,
WHEREYEARo_orderdate)ASo_yearjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   o_orderdate< '993-0701  INTERVAL 3 
  AND EXISTS (
    SELECT * FROM lineitem
WHERE  =o_orderkey
      AND l_commitdate <   s_suppkey=l_suppkey
  )
GROUP BY o_orderpriority
ORDER BY o_orderpriority;

-- Q5: Local Supplier Volume
SELECT
  n_name,
  SUM(l_extendedpriceAND  =l_partkey
java.lang.StringIndexOutOfBoundsException: Range [13, 4) out of bounds for length 57
WHERE c_custkey = o_custkeys_nationkey=n_nationkey
  AND    ANDp_name  '%reen%
  AND java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  AND c_nationkey = s_nationkeyORDERBYnation  ;
  AND s_nationkey = n_nationkey
  AND n_regionkey
  AND r_name = 'ASIA'
  AND o_orderdate >= DATE '1994-01-01'
  AND o_orderdate < DATE '1994-01-01' + INTERVAL 1 YEAR
GROUP BY n_name
ORDER BY revenue DESC;

-- Q6: Forecasting Revenue Change
SELECT
  SUM(l_extendedprice * l_discount) AS revenue
FROM lineitem
WHERE l_shipdate >= DATE '1994-01-01'
  AND l_shipdate < DATE '1994-01-01' + INTERVAL 1 YEAR
  AND l_discount BETWEEN 0.06 - 0.01 AND 0.06 + 0.01
  AND l_quantity < 24;

-- Q7: Volume Shipping
SELECT
  supp_nation, cust_nation, l_year,
  SUM(volume) AS revenue
FROM (
  SELECT
    n1.n_name AS supp_nation,
    n2.n_name AS cust_nation,
    YEAR(l_shipdate) AS l_year,
    l_extendedprice * (1 - l_discount) AS volume
  FROM supplier, lineitem, orders, customer, nation n1, nation n2
  WHERE s_suppkey = l_suppkey
    AND o_orderkey = l_orderkey
    AND c_custkey = o_custkey
    AND s_nationkey = n1.n_nationkey
    AND c_nationkey = n2.n_nationkey
    AND ((n1.n_name = 'FRANCE' AND n2.n_name = 'GERMANY')
      OR (n1.n_name = 'GERMANY' AND n2.n_name = 'FRANCE'))
    AND l_shipdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31'
) AS shipping
GROUP BY supp_nation, cust_nation, l_year
-- Q10: Returned java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 6

-- Q8: National Market Share
SELECTc_custkey
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 9
(   volume0)SUM
FROM (
  SELECT
    YEAR(AND l_returnflagR
scountAS
    n2.n_name AS nation
   part, supplier ,orders ,nationn1,nationn2,region
  WHERE p_partkey   DESC
D   
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
  
    ANDps_suppkeyjava.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
    HAVING(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 43
    AND r_name = 'AMERICA'
    AND s_nationkey = n2.n_nationkey
java.lang.StringIndexOutOfBoundsException: Range [33, 25) out of bounds for length 33
    AND p_type = 'ECONOMY ANODIZED STEEL'
) AS all_nations
GROUP BY o_year
ORDER BY o_year;

-- Q9: Product Type Profit Measure
SELECT
  nation, o_year,
  SUM(amount) AS sum_profit
FROM (
  SELECT
    n_name AS nation,
YEAR(_)AS o_year,
    l_extendedprice * (1)
FROMpart  , partsupp ,nation
  WHERE s_suppkey 
    -- Q12: Shipping Modes and OrderSELECT
     =l_partkey
    AND p_partkey =WHENjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 67
o_orderkey=l_orderkey
    AND java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 10
AND LIKE'green%'
) AS profit
GROUP BY nation, o_year
ORDER BY nation, o_year DESC;

-- Q10: Returned Item Reporting
SELECT
  c_custkey, c_name,
  SUM(l_extendedpriceWHERE o_orderkey =l_orderkey
  ,n_name,c_address, c_phone c_comment
FROM customer, orders, lineitem, nation
WHERE  =
  AND l_orderkey =  l_shipdate < l_commitda
  AND  >  1993-01java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    *1  java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 55
AND=R
  AND c_nationkey = ,
l_partkey
ORDER >  1995--'
20java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

-- Q11: Important Stock Identification
    l_ java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
  ps_partkey,
  SUM 
 java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 31
ps_suppkey=
  AND s_nationkey = n_nationkey
  AND n_name
SELECT  java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 59
  AND   (SELECT( java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
  *java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 50
   java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 33
  java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
    AND s_nationkey = AND p_type NOT LIKE 'MEDIUM
    AND =java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
)
ORDER BY value DESC;

-- Q12: Shipping Modes and Order Priority
SELECT
  l_shipmode,
  SUM(CASE
     '%
    THEN 1 ELSE 0 END) AS java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3
  SUM(java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
<'1  java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 70
    THEN 1 ELSE 0 END) AS low_line_count
FROM orders, lineitem
WHERE o_orderkey = l_orderkey
  AND l_shipmode IN ('MAIL', 'SHIPF  java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
   =MBOX
  AND l_shipdate  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
FROM 
      l_partkey 
GROUP java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 4
ORDER   c_namejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 59

-- Q13: Customer Distribution
SELECT
  c_count  (
FROM (
, (
  FROM customer l_orderkey
    ON     ON c_custkey = antity) 300
    AND o_comment   o_orderkey 
   
) AS c_orders
 
ORDER BY 100java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

-- Q14: Promotion Effect
SELECT
  100.00 * SUM(CASE java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 27
*1 java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 55
/java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 60
FROM lineitem, part
WHERE l_partkey = p_partkey
  AND l_shipdate >      ='java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 47
  ANDAND 'BAG'  '' PKG MEDjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

-- Q15: Top Supplier
WITH       AND p_1ANDjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  SELECT
       java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 47
        =34java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  
  WHERE l_shipdate >= DATE '1996-01-01'
    <'19960101  java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 57
  GROUP BY l_suppkeyjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 33
)
SELECT s_suppkey, s_name, s_address, s_phone, total_revenue
FROM supplier, revenue
WHERE s_suppkey = supplier_no
  AND total_revenue = (SELECT MAX(total_revenue) FROM revenue)
ORDER BY s_suppkey;

-- Q16: Parts/Supplier Relationship
SELECT
  p_brand, p_type, p_size,
  COUNT(DISTINCT ps_suppkey) AS supplier_cnt
FROMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   
  AND p_brand ,nation
   p_type NOT M '
  AND p_size IN (49, 14, 23, 45, 19, 3, 36, 9)
  AND ps_suppkey NOT IN (
SELECTFROM
    WHERE s_comment LIKE '%Customer%Complaints%'
  AND  
 0.  java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 DESC   p_size;

-- Q17: Small-Quantity-Order Revenue
SELECT
  SUM(l_extendedprice) / 7.0 AS           AND l_shipdate >= DATE '1994
FROM lineitem, part
WHERE  = l_partkey
  AND p_brand-- Q21: Suppliers Who Kept Orders Waiting
  ANDp_container='MED BOX'
  AND l_quantity < (
    SELECT 0.2 * AVG(l_quantity)
    FROM lineitem
    WHERE l_partkey = p_partkey


-- Q18: Large Volume Customer
SELECT
  , o_orderkey ,o_totalprice,
  SUM(l_quantity)
FROM customer, orders,   ._eceiptdate>l1l_commitdate
WHERE o_orderkey  (
    SELECT l_orderkey FROM lineitem     *FROM lineiteml2
GROUP l_orderkey
    HAVING SUM(l_quantity) > 300
  )
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  AND o_orderkey = l_orderkeyWHEREl3.o =l1.
GROUP BY , c_custkey, o_orderkey,o_orderdate o_totalprice
       l3. >l3.
LIMIT 100  )

-- Q19: Discounted Revenue
SELECT
  SUM(l_extendedprice   AND  =
FROM,part
  =
  AND (
    (  Brand12'
      ;
      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
      AND   cntrycode, COUNT)AS,
     AND ' AIR REG'
      AND (
    OR
    (p_brand = 'Brand#23'
      AND  ' ' BOX PKG )
      AND l_quantity >= 10       ) 
      AND p_size java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
AND(' AIR ')
      AND l_shipinstruct = 'DELIVER IN PERSON')
    OR
p  '
       IN',LG ' 'LGPACK,' java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
      AND > 20ANDjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 52
      AND p_size BETWEEN 1 AND 15
      AND     AND NOT EXISTS (
      AND l_shipinstruct        orders  =
  );

GROUP BY cntrycode
SELECT s_name, s_address cntrycode
FROM supplier, nation
WHERE s_suppkey IN (
    SELECT ps_suppkey FROM partsupp
    WHERE ps_partkey IN (
        SELECT p_partkey FROM part WHERE p_name LIKE 'forest%'
      )
      AND ps_availqty > (
        SELECT 0.5 * SUM(l_quantity)
        FROM lineitem
        WHERE l_partkey = ps_partkey
          AND l_suppkey = ps_suppkey
          AND l_shipdate >= DATE '1994-01-01'
          AND l_shipdate < DATE '1994-01-01' + INTERVAL 1 YEAR
      )
  )
  AND s_nationkey = n_nationkey
  AND n_name = 'CANADA'
ORDER BY s_name;

-- Q21: Suppliers Who Kept Orders Waiting
SELECT s_name, COUNT(*) AS numwait
FROM supplier, lineitem l1, orders, nation
WHERE s_suppkey = l1.l_suppkey
  AND o_orderkey = l1.l_orderkey
  AND o_orderstatus = 'F'
  AND l1.l_receiptdate > l1.l_commitdate
  AND EXISTS (
    SELECT * FROM lineitem l2
    WHERE l2.l_orderkey = l1.l_orderkey
      AND l2.l_suppkey <> l1.l_suppkey
  )
  AND NOT EXISTS (
    SELECT * FROM lineitem l3
    WHERE l3.l_orderkey = l1.l_orderkey
      AND l3.l_suppkey <> l1.l_suppkey
      AND l3.l_receiptdate > l3.l_commitdate
  )
  AND s_nationkey = n_nationkey
  AND n_name = 'SAUDI ARABIA'
GROUP BY s_name
ORDER BY numwait DESC, s_name
LIMIT 100;

-- Q22: Global Sales Opportunity
SELECT
  cntrycode, COUNT(*) AS numcust,
  SUM(c_acctbal) AS totacctbal
FROM (
  SELECT
    SUBSTRING(c_phone FROM 1 FOR 2) AS cntrycode,
    c_acctbal
  FROM customer
  WHERE SUBSTRING(c_phone FROM 1 FOR 2) IN ('13','31','23','29','30','18','17')
    AND c_acctbal > (
      SELECT AVG(c_acctbal) FROM customer
      WHERE c_acctbal > 0.00
        AND SUBSTRING(c_phone FROM 1 FOR 2) IN ('13','31','23','29','30','18','17')
    )
    AND NOT EXISTS (
      SELECT * FROM orders WHERE o_custkey = c_custkey
    )
) AS custsale
GROUP BY cntrycode
ORDER BY cntrycode;

Messung V0.5 in Prozent
C=92 H=92 G=91

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723